public function onBuild(MenuEvent $event): void
    {
        if (null === $this->managerPath || !$this->isAdminUser()) {
            return;
        }

        $categoryNode = $event->getTree()->getChild('system');

        if (null === $categoryNode) {
            return;
        }

        $item = $event->getFactory()->createItem(
            'contao_manager',
            [
                'label' => 'Contao Manager',
                'attributes' => [
                    'title' => 'Contao Manager',
                    'href' => '/'.$this->managerPath,
                    'class' => 'navigation contao_manager',
                ],
            ]
        );

        $categoryNode->addChild($item);
    }
public function onBuild(MenuEvent $event): void
    {
        if (null === $this->managerPath || !$this->isAdminUser()) {
            return;
        }

        $categoryNode = $event->getTree()->getChild('system');

        if (null === $categoryNode) {
            return;
        }

        $item = $event->getFactory()->createItem(
            'contao_manager',
            [
                'label' => 'Contao Manager',
                'attributes' => [
                    'title' => 'Contao Manager',
                    'href' => '/'.$this->managerPath,
                    'class' => 'navigation contao_manager',
                ],
            ]
        );

        $categoryNode->addChild($item);
    }
public function onBuild ( MenuEvent $ event ) : void { if ( null === $ this -> managerPath || ! $ this -> isAdminUser ( ) ) { return ; } $ categoryNode = $ event -> getTree ( ) -> getChild ( 'system' ) ; if ( null === $ categoryNode ) { return ; } $ item = $ event -> getFactory ( ) -> createItem ( 'contao_manager' , [ 'label' => 'Contao Manager' , 'attributes' => [ 'title' => 'Contao Manager' , 'href' => '/' . $ this -> managerPath , 'class' => 'navigation contao_manager' , ] , ] ) ; $ categoryNode -> addChild ( $ item ) ; }
Adds a link to the Contao Manager in the back end navigation.
Adds a link to the Contao Manager in the back end navigation .