Bundle/PageBundle/Listener/PageMenuListener.php
public function getMainItem()
    {
        $menuPage = $this->menuBuilder->getTopNavbar()->getChild('menu.page');

        if ($menuPage) {
            return $menuPage;
        } else {
            return $this->menuBuilder->createDropdownMenuItem(
                $this->menuBuilder->getTopNavbar(),
                'menu.page'
            );
        }
    }
public function getMainItem()
    {
        $menuPage = $this->menuBuilder->getTopNavbar()->getChild('menu.page');

        if ($menuPage) {
            return $menuPage;
        } else {
            return $this->menuBuilder->createDropdownMenuItem(
                $this->menuBuilder->getTopNavbar(),
                'menu.page'
            );
        }
    }
public function getMainItem ( ) { $ menuPage = $ this -> menuBuilder -> getTopNavbar ( ) -> getChild ( 'menu.page' ) ; if ( $ menuPage ) { return $ menuPage ; } else { return $ this -> menuBuilder -> createDropdownMenuItem ( $ this -> menuBuilder -> getTopNavbar ( ) , 'menu.page' ) ; } }
Get the main item.

@return \Knp\Menu\ItemInterface <\Knp\Menu\ItemInterface, NULL>|\Knp\Menu\ItemInterface
Get the main item .