ObjectController: add beforeTabs hook

This commit is contained in:
Thomas Gelf 2016-03-18 11:44:48 +01:00
parent 1dbf2e8410
commit 6bd8a492b6
1 changed files with 6 additions and 1 deletions

View File

@ -22,7 +22,7 @@ abstract class ObjectController extends ActionController
$type = $this->getType();
if ($object = $this->loadObject()) {
$this->beforeTabs();
$params = $object->getUrlParams();
$tabs = $this->getTabs()->add('modify', array(
@ -52,6 +52,7 @@ abstract class ObjectController extends ActionController
));
}
} else {
$this->beforeTabs();
$this->getTabs()->add('add', array(
'url' => sprintf('director/%s/add', $type),
'label' => sprintf($this->translate('Add %s'), ucfirst($type)),
@ -385,4 +386,8 @@ abstract class ObjectController extends ActionController
}
}
}
protected function beforeTabs()
{
}
}