NavigationConfigForm: Require NavigationItemForm as base class
refs #5600
This commit is contained in:
parent
b39eddf69d
commit
c657812b9c
|
@ -3,9 +3,7 @@
|
|||
|
||||
namespace Icinga\Forms\Navigation;
|
||||
|
||||
use Icinga\Web\Form;
|
||||
|
||||
class DashletForm extends Form
|
||||
class DashletForm extends NavigationItemForm
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue