ModelBundle/Repository/NodeRepository.php
public function getSubMenu($nodeId, $nbLevel, $language, $siteId)
    {
        $node = $this->findOnePublished($nodeId, $language, $siteId);
        $list = array();

        if ($node instanceof ReadNodeInterface) {
            $list[] = $node;
            $list = array_merge($list, $this->getTreeParentIdLevelAndLanguage($node->getNodeId(), $nbLevel, $language, $siteId));
        }

        return $list;
    }
public function getSubMenu($nodeId, $nbLevel, $language, $siteId)
    {
        $node = $this->findOnePublished($nodeId, $language, $siteId);
        $list = array();

        if ($node instanceof ReadNodeInterface) {
            $list[] = $node;
            $list = array_merge($list, $this->getTreeParentIdLevelAndLanguage($node->getNodeId(), $nbLevel, $language, $siteId));
        }

        return $list;
    }
public function getSubMenu ( $ nodeId , $ nbLevel , $ language , $ siteId ) { $ node = $ this -> findOnePublished ( $ nodeId , $ language , $ siteId ) ; $ list = array ( ) ; if ( $ node instanceof ReadNodeInterface ) { $ list [ ] = $ node ; $ list = array_merge ( $ list , $ this -> getTreeParentIdLevelAndLanguage ( $ node -> getNodeId ( ) , $ nbLevel , $ language , $ siteId ) ) ; } return $ list ; }
@param string $nodeId
@param int    $nbLevel
@param string $language
@param string $siteId

@return array
@param string $nodeId @param int $nbLevel @param string $language @param string $siteId