Sulu\Bundle\SnippetBundle\Admin\SnippetAdmin::__construct PHP Method

__construct() public method

public __construct ( Sulu\Component\Security\Authorization\SecurityCheckerInterface $securityChecker, Sulu\Component\Webspace\Manager\WebspaceManagerInterface $webspaceManager, $defaultEnabled, $title )
$securityChecker Sulu\Component\Security\Authorization\SecurityCheckerInterface
$webspaceManager Sulu\Component\Webspace\Manager\WebspaceManagerInterface
    public function __construct(SecurityCheckerInterface $securityChecker, WebspaceManagerInterface $webspaceManager, $defaultEnabled, $title)
    {
        $this->securityChecker = $securityChecker;
        $this->webspaceManager = $webspaceManager;
        $this->defaultEnabled = $defaultEnabled;
        $rootNavigationItem = new NavigationItem($title);
        $section = new NavigationItem('navigation.modules');
        $section->setPosition(20);
        if ($this->securityChecker->hasPermission('sulu.global.snippets', 'view')) {
            $snippet = new NavigationItem('navigation.snippets');
            $snippet->setPosition(10);
            $snippet->setIcon('sticky-note-o');
            $snippet->setAction('snippet/snippets');
            $section->addChild($snippet);
            $rootNavigationItem->addChild($section);
        }
        $this->setNavigation(new Navigation($rootNavigationItem));
    }