From c657812b9c297528e06b1a902776de9b3489e628 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 18 Sep 2015 09:43:40 +0200 Subject: [PATCH] NavigationConfigForm: Require NavigationItemForm as base class refs #5600 --- application/forms/Navigation/DashletForm.php | 4 +--- application/forms/Navigation/NavigationConfigForm.php | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/application/forms/Navigation/DashletForm.php b/application/forms/Navigation/DashletForm.php index dc9a02803..c1e6f66ec 100644 --- a/application/forms/Navigation/DashletForm.php +++ b/application/forms/Navigation/DashletForm.php @@ -3,9 +3,7 @@ namespace Icinga\Forms\Navigation; -use Icinga\Web\Form; - -class DashletForm extends Form +class DashletForm extends NavigationItemForm { /** * {@inheritdoc} diff --git a/application/forms/Navigation/NavigationConfigForm.php b/application/forms/Navigation/NavigationConfigForm.php index f2bb0be70..4a013901e 100644 --- a/application/forms/Navigation/NavigationConfigForm.php +++ b/application/forms/Navigation/NavigationConfigForm.php @@ -10,6 +10,7 @@ use Icinga\Application\Icinga; use Icinga\Authentication\Auth; use Icinga\Exception\IcingaException; use Icinga\Exception\NotFoundError; +use Icinga\Exception\ProgrammingError; use Icinga\Forms\ConfigForm; use Icinga\User; use Icinga\Util\String; @@ -665,8 +666,8 @@ class NavigationConfigForm extends ConfigForm ); $form = new NavigationItemForm(); - } elseif (! $form instanceof Form) { - throw new ProgrammingError('Class %s must inherit from Form', $classPath); + } elseif (! $form instanceof NavigationItemForm) { + throw new ProgrammingError('Class %s must inherit from NavigationItemForm', $classPath); } return $form;