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;
|
namespace Icinga\Forms\Navigation;
|
||||||
|
|
||||||
use Icinga\Web\Form;
|
class DashletForm extends NavigationItemForm
|
||||||
|
|
||||||
class DashletForm extends Form
|
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue