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

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

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

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

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

@param array $options The options for the menu.

@return ItemInterface The menu.
Create the admin menu .