src/Kunstmaan/NodeBundle/Helper/Menu/PageMenuAdaptor.php
private function getTreeNodes(
        $lang,
        $permission,
        AclNativeHelper $aclNativeHelper,
        $includeHiddenFromNav
    ) {
        if (null === $this->treeNodes) {
            $repo = $this->em->getRepository('KunstmaanNodeBundle:Node');
            $this->treeNodes = [];

            $rootNode = $this->domainConfiguration->getRootNode();

            // Get all nodes that should be shown in the menu
            $allNodes = $repo->getAllMenuNodes(
                $lang,
                $permission,
                $aclNativeHelper,
                $includeHiddenFromNav,
                $rootNode
            );
            /** @var Node $nodeInfo */
            foreach ($allNodes as $nodeInfo) {
                $refEntityName = $nodeInfo['ref_entity_name'];
                if ($this->pagesConfiguration->isHiddenFromTree($refEntityName)) {
                    continue;
                }
                $parent_id = is_null($nodeInfo['parent']) ? 0 : $nodeInfo['parent'];
                unset($nodeInfo['parent']);
                $this->treeNodes[$parent_id][] = $nodeInfo;
            }
            unset($allNodes);
        }

        return $this->treeNodes;
    }
private function getTreeNodes(
        $lang,
        $permission,
        AclNativeHelper $aclNativeHelper,
        $includeHiddenFromNav
    ) {
        if (null === $this->treeNodes) {
            $repo = $this->em->getRepository('KunstmaanNodeBundle:Node');
            $this->treeNodes = [];

            $rootNode = $this->domainConfiguration->getRootNode();

            // Get all nodes that should be shown in the menu
            $allNodes = $repo->getAllMenuNodes(
                $lang,
                $permission,
                $aclNativeHelper,
                $includeHiddenFromNav,
                $rootNode
            );
            /** @var Node $nodeInfo */
            foreach ($allNodes as $nodeInfo) {
                $refEntityName = $nodeInfo['ref_entity_name'];
                if ($this->pagesConfiguration->isHiddenFromTree($refEntityName)) {
                    continue;
                }
                $parent_id = is_null($nodeInfo['parent']) ? 0 : $nodeInfo['parent'];
                unset($nodeInfo['parent']);
                $this->treeNodes[$parent_id][] = $nodeInfo;
            }
            unset($allNodes);
        }

        return $this->treeNodes;
    }
private function getTreeNodes ( $ lang , $ permission , AclNativeHelper $ aclNativeHelper , $ includeHiddenFromNav ) { if ( null === $ this -> treeNodes ) { $ repo = $ this -> em -> getRepository ( 'KunstmaanNodeBundle:Node' ) ; $ this -> treeNodes = [ ] ; $ rootNode = $ this -> domainConfiguration -> getRootNode ( ) ; // Get all nodes that should be shown in the menu $ allNodes = $ repo -> getAllMenuNodes ( $ lang , $ permission , $ aclNativeHelper , $ includeHiddenFromNav , $ rootNode ) ; /** @var Node $nodeInfo */ foreach ( $ allNodes as $ nodeInfo ) { $ refEntityName = $ nodeInfo [ 'ref_entity_name' ] ; if ( $ this -> pagesConfiguration -> isHiddenFromTree ( $ refEntityName ) ) { continue ; } $ parent_id = is_null ( $ nodeInfo [ 'parent' ] ) ? 0 : $ nodeInfo [ 'parent' ] ; unset ( $ nodeInfo [ 'parent' ] ) ; $ this -> treeNodes [ $ parent_id ] [ ] = $ nodeInfo ; } unset ( $ allNodes ) ; } return $ this -> treeNodes ; }
Get the list of nodes that is used in the admin menu.

@param string          $lang
@param string          $permission
@param AclNativeHelper $aclNativeHelper
@param bool            $includeHiddenFromNav

@return array
Get the list of nodes that is used in the admin menu .