NotificationController: fix method signature

This commit is contained in:
Thomas Gelf 2017-08-21 08:04:29 +02:00
parent 7e13a9a4f2
commit 058bcb083d
1 changed files with 7 additions and 1 deletions

View File

@ -15,10 +15,12 @@ class NotificationController extends ObjectController
$this->assertPermission('director/notifications'); $this->assertPermission('director/notifications');
} }
// TODO: KILL IT
public function init() public function init()
{ {
parent::init(); parent::init();
// TODO: Check if this is still needed, remove it otherwise // TODO: Check if this is still needed, remove it otherwise
/** @var \Icinga\Web\Widget\Tab $tab */
if ($this->object && $this->object->object_type === 'apply') { if ($this->object && $this->object->object_type === 'apply') {
if ($host = $this->params->get('host')) { if ($host = $this->params->get('host')) {
foreach ($this->getTabs()->getTabs() as $tab) { foreach ($this->getTabs()->getTabs() as $tab) {
@ -37,8 +39,12 @@ class NotificationController extends ObjectController
/** /**
* @param DirectorObjectForm $form * @param DirectorObjectForm $form
*/ */
protected function onObjectFormLoaded($form) protected function onObjectFormLoaded(DirectorObjectForm $form)
{ {
if (! $this->object) {
return;
}
if ($this->object->isTemplate()) { if ($this->object->isTemplate()) {
$form->setListUrl('director/notifications/templates'); $form->setListUrl('director/notifications/templates');
} else { } else {