public function sideMenu()
    {
        $menu = $this->factory->createItem('root');

        $this->dispatcher->dispatch(
            ConfigureMenuEvent::CONFIGURE,
            new ConfigureMenuEvent($this->factory, $menu)
        );

        return $menu;
    }
public function sideMenu()
    {
        $menu = $this->factory->createItem('root');

        $this->dispatcher->dispatch(
            ConfigureMenuEvent::CONFIGURE,
            new ConfigureMenuEvent($this->factory, $menu)
        );

        return $menu;
    }
public function sideMenu ( ) { $ menu = $ this -> factory -> createItem ( 'root' ) ; $ this -> dispatcher -> dispatch ( ConfigureMenuEvent :: CONFIGURE , new ConfigureMenuEvent ( $ this -> factory , $ menu ) ) ; return $ menu ; }
Build main menu.

Let any bundle add items to this menu by subscribing to ConfigureMenuEvent::CONFIGURE
@see ConfigureMenuContentListener for example

@param array $options
@return \Knp\Menu\ItemInterface
Build main menu .