NavigationConfigForm: Require NavigationItemForm as base class

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-18 09:43:40 +02:00
parent b39eddf69d
commit c657812b9c
2 changed files with 4 additions and 5 deletions

View File

@ -3,9 +3,7 @@
namespace Icinga\Forms\Navigation; namespace Icinga\Forms\Navigation;
use Icinga\Web\Form; class DashletForm extends NavigationItemForm
class DashletForm extends Form
{ {
/** /**
* {@inheritdoc} * {@inheritdoc}

View File

@ -10,6 +10,7 @@ use Icinga\Application\Icinga;
use Icinga\Authentication\Auth; use Icinga\Authentication\Auth;
use Icinga\Exception\IcingaException; use Icinga\Exception\IcingaException;
use Icinga\Exception\NotFoundError; use Icinga\Exception\NotFoundError;
use Icinga\Exception\ProgrammingError;
use Icinga\Forms\ConfigForm; use Icinga\Forms\ConfigForm;
use Icinga\User; use Icinga\User;
use Icinga\Util\String; use Icinga\Util\String;
@ -665,8 +666,8 @@ class NavigationConfigForm extends ConfigForm
); );
$form = new NavigationItemForm(); $form = new NavigationItemForm();
} elseif (! $form instanceof Form) { } elseif (! $form instanceof NavigationItemForm) {
throw new ProgrammingError('Class %s must inherit from Form', $classPath); throw new ProgrammingError('Class %s must inherit from NavigationItemForm', $classPath);
} }
return $form; return $form;