public function createUserMenu(array $options)
    {
        $menu = $this->factory->createItem('root');
        $menu->setLabel($this->token_storage->getToken()->getUser()->__toString());

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

        return $menu;
    }
public function createUserMenu(array $options)
    {
        $menu = $this->factory->createItem('root');
        $menu->setLabel($this->token_storage->getToken()->getUser()->__toString());

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

        return $menu;
    }
public function createUserMenu ( array $ options ) { $ menu = $ this -> factory -> createItem ( 'root' ) ; $ menu -> setLabel ( $ this -> token_storage -> getToken ( ) -> getUser ( ) -> __toString ( ) ) ; $ event = new UserMenuCollectionEvent ( $ menu ) ; $ this -> dispatcher -> dispatch ( UserMenuCollectionEvent :: NAME , $ event ) ; return $ menu ; }
Create the user menu.

@param array $options The options for the menu.

@return ItemInterface The menu.
Create the user menu .