Twig/MenuExtension.php
public function getMenu(string $menuClass, $options = []): ItemInterface
    {
        // Merge Options
        $options = array_merge($this->defaultOptions, $options);

        // Get Menu
        $menu = $this->container->has($menuClass) ? $this->container->get($menuClass) : new $menuClass();

        // Render
        if ($menu instanceof MenuInterface) {
            return $this->itemProcess->processMenu($menu->createMenu($options), $options);
        }

        return false;
    }
public function getMenu(string $menuClass, $options = []): ItemInterface
    {
        // Merge Options
        $options = array_merge($this->defaultOptions, $options);

        // Get Menu
        $menu = $this->container->has($menuClass) ? $this->container->get($menuClass) : new $menuClass();

        // Render
        if ($menu instanceof MenuInterface) {
            return $this->itemProcess->processMenu($menu->createMenu($options), $options);
        }

        return false;
    }
public function getMenu ( string $ menuClass , $ options = [ ] ) : ItemInterface { // Merge Options $ options = array_merge ( $ this -> defaultOptions , $ options ) ; // Get Menu $ menu = $ this -> container -> has ( $ menuClass ) ? $ this -> container -> get ( $ menuClass ) : new $ menuClass ( ) ; // Render if ( $ menu instanceof MenuInterface ) { return $ this -> itemProcess -> processMenu ( $ menu -> createMenu ( $ options ) , $ options ) ; } return false ; }
Get Menu Array.

@param string $menuClass
@param array  $options

@return ItemInterface|bool
Get Menu Array .