mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
ObjectController: add beforeTabs hook
This commit is contained in:
parent
1dbf2e8410
commit
6bd8a492b6
@ -22,7 +22,7 @@ abstract class ObjectController extends ActionController
|
|||||||
$type = $this->getType();
|
$type = $this->getType();
|
||||||
|
|
||||||
if ($object = $this->loadObject()) {
|
if ($object = $this->loadObject()) {
|
||||||
|
$this->beforeTabs();
|
||||||
$params = $object->getUrlParams();
|
$params = $object->getUrlParams();
|
||||||
|
|
||||||
$tabs = $this->getTabs()->add('modify', array(
|
$tabs = $this->getTabs()->add('modify', array(
|
||||||
@ -52,6 +52,7 @@ abstract class ObjectController extends ActionController
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
$this->beforeTabs();
|
||||||
$this->getTabs()->add('add', array(
|
$this->getTabs()->add('add', array(
|
||||||
'url' => sprintf('director/%s/add', $type),
|
'url' => sprintf('director/%s/add', $type),
|
||||||
'label' => sprintf($this->translate('Add %s'), ucfirst($type)),
|
'label' => sprintf($this->translate('Add %s'), ucfirst($type)),
|
||||||
@ -385,4 +386,8 @@ abstract class ObjectController extends ActionController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function beforeTabs()
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user