src/Menu/MenuBuilder.php
public function getFullMenu($menuName)
    {
        if (is_array($menuName)) {
            $menuName = reset($menuName);
        }

        if (array_key_exists($menuName, $this->menuIterators) && count($this->menuIterators[$menuName]) > 0) {
            return $this->menuIterators[$menuName];
        }

        /** @var $mainMenu Menu */
        $mainMenu = $this->menuManager->findOneBy(
            ['name' => $menuName, 'locale' => $this->request->getLocale()]
        );

        if (!$mainMenu) {
            return [];
        }

        $this->menuIterators[$menuName] = $this->menuManager->getChildrenByStatus(
            $mainMenu,
            false,
            null,
            'ASC',
            false,
            $this->viewStatus
        );

        return $this->menuIterators[$menuName];
    }
public function getFullMenu($menuName)
    {
        if (is_array($menuName)) {
            $menuName = reset($menuName);
        }

        if (array_key_exists($menuName, $this->menuIterators) && count($this->menuIterators[$menuName]) > 0) {
            return $this->menuIterators[$menuName];
        }

        /** @var $mainMenu Menu */
        $mainMenu = $this->menuManager->findOneBy(
            ['name' => $menuName, 'locale' => $this->request->getLocale()]
        );

        if (!$mainMenu) {
            return [];
        }

        $this->menuIterators[$menuName] = $this->menuManager->getChildrenByStatus(
            $mainMenu,
            false,
            null,
            'ASC',
            false,
            $this->viewStatus
        );

        return $this->menuIterators[$menuName];
    }
public function getFullMenu ( $ menuName ) { if ( is_array ( $ menuName ) ) { $ menuName = reset ( $ menuName ) ; } if ( array_key_exists ( $ menuName , $ this -> menuIterators ) && count ( $ this -> menuIterators [ $ menuName ] ) > 0 ) { return $ this -> menuIterators [ $ menuName ] ; } /** @var $mainMenu Menu */ $ mainMenu = $ this -> menuManager -> findOneBy ( [ 'name' => $ menuName , 'locale' => $ this -> request -> getLocale ( ) ] ) ; if ( ! $ mainMenu ) { return [ ] ; } $ this -> menuIterators [ $ menuName ] = $ this -> menuManager -> getChildrenByStatus ( $ mainMenu , false , null , 'ASC' , false , $ this -> viewStatus ) ; return $ this -> menuIterators [ $ menuName ] ; }
Retrieve the full menu tree.

@param string $menuName

@return array|bool
Retrieve the full menu tree .