Skip to content

Commit

Permalink
NavigationConfigForm: Require NavigationItemForm as base class
Browse files Browse the repository at this point in the history
refs #5600
  • Loading branch information
Johannes Meyer committed Sep 18, 2015
1 parent b39eddf commit c657812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions application/forms/Navigation/DashletForm.php
Expand Up @@ -3,9 +3,7 @@

namespace Icinga\Forms\Navigation;

use Icinga\Web\Form;

class DashletForm extends Form
class DashletForm extends NavigationItemForm
{
/**
* {@inheritdoc}
Expand Down
5 changes: 3 additions & 2 deletions application/forms/Navigation/NavigationConfigForm.php
Expand Up @@ -10,6 +10,7 @@
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;
Expand Down Expand Up @@ -665,8 +666,8 @@ protected function getItemForm($type)
);

$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;
Expand Down

0 comments on commit c657812

Please sign in to comment.