public function createMainMenu(array $options): ItemInterface
    {
        $menu = $this->factory->createItem('root');

        $event = new MainMenuCollectionEvent($menu);
        $this->dispatcher->dispatch(MainMenuCollectionEvent::NAME, $event);

        return $menu;
    }
public function createMainMenu(array $options): ItemInterface
    {
        $menu = $this->factory->createItem('root');

        $event = new MainMenuCollectionEvent($menu);
        $this->dispatcher->dispatch(MainMenuCollectionEvent::NAME, $event);

        return $menu;
    }
public function createMainMenu ( array $ options ) : ItemInterface { $ menu = $ this -> factory -> createItem ( 'root' ) ; $ event = new MainMenuCollectionEvent ( $ menu ) ; $ this -> dispatcher -> dispatch ( MainMenuCollectionEvent :: NAME , $ event ) ; return $ menu ; }
Create the main menu.

@param array $options The options for the menu.

@return ItemInterface The menu.
Create the main menu .