From 6bd8a492b6adeeb3a0f12795a31cb197f653aab5 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 18 Mar 2016 11:44:48 +0100 Subject: [PATCH] ObjectController: add beforeTabs hook --- library/Director/Web/Controller/ObjectController.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/Director/Web/Controller/ObjectController.php b/library/Director/Web/Controller/ObjectController.php index 1bdb77b8..4857dc8b 100644 --- a/library/Director/Web/Controller/ObjectController.php +++ b/library/Director/Web/Controller/ObjectController.php @@ -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() + { + } }