src/Menu/FrontendMenuBuilder.php
public function createSubnavMenu($menuName, $classes = 'nav nav-tabs nav-stacked')
    {
        $menu = $this->factory->createItem('root');

        if ($classes) {
            $menu->setChildrenAttribute('class', $classes);
        }

        /** @var $mainMenu Menu */
        $menuIterator = $this->getSubMenu($menuName, 1);

        if (!$menuIterator) {
            return $menu;
        }

        $startDepth = 2;

        $menu = $this->createMenu($menu, $menuIterator, $startDepth);
        $this->showOnlyCurrentChildren($menu);
        $this->setRecursiveAttribute($menu, ['class' => 'nav nav-list']);

        return $menu;
    }
public function createSubnavMenu($menuName, $classes = 'nav nav-tabs nav-stacked')
    {
        $menu = $this->factory->createItem('root');

        if ($classes) {
            $menu->setChildrenAttribute('class', $classes);
        }

        /** @var $mainMenu Menu */
        $menuIterator = $this->getSubMenu($menuName, 1);

        if (!$menuIterator) {
            return $menu;
        }

        $startDepth = 2;

        $menu = $this->createMenu($menu, $menuIterator, $startDepth);
        $this->showOnlyCurrentChildren($menu);
        $this->setRecursiveAttribute($menu, ['class' => 'nav nav-list']);

        return $menu;
    }
public function createSubnavMenu ( $ menuName , $ classes = 'nav nav-tabs nav-stacked' ) { $ menu = $ this -> factory -> createItem ( 'root' ) ; if ( $ classes ) { $ menu -> setChildrenAttribute ( 'class' , $ classes ) ; } /** @var $mainMenu Menu */ $ menuIterator = $ this -> getSubMenu ( $ menuName , 1 ) ; if ( ! $ menuIterator ) { return $ menu ; } $ startDepth = 2 ; $ menu = $ this -> createMenu ( $ menu , $ menuIterator , $ startDepth ) ; $ this -> showOnlyCurrentChildren ( $ menu ) ; $ this -> setRecursiveAttribute ( $ menu , [ 'class' => 'nav nav-list' ] ) ; return $ menu ; }
Create frontend sub navigation on the left hand side of the screen.

@param string $menuName
@param string $classes

@return bool|\Knp\Menu\ItemInterface
Create frontend sub navigation on the left hand side of the screen .