lib/Psc/Doctrine/NavigationNodeRepository.php
public function getPath($node) {
    // ACTIVE ?
    
    $qb = $this->createQueryBuilder('node');
    $qb
        ->where($qb->expr()->lte('node.lft', $node->getLft()))
        ->andWhere($qb->expr()->gte('node.rgt', $node->getRgt()))
        ->andWhere('node.context = :context')
        ->orderBy('node.lft', 'ASC')
    ;
    
    /*
    if (isset($config['root'])) {
        $rootId = $wrapped->getPropertyValue($config['root']);
        $qb->andWhere($rootId === null ?
            $qb->expr()->isNull('node.'.$config['root']) :
            $qb->expr()->eq('node.'.$config['root'], is_string($rootId) ? $qb->expr()->literal($rootId) : $rootId)
        );
    }
    */
    $query = $qb->getQuery()->setParameter('context', $node->getContext());
    
    return $query->getResult();
  }
public function getPath($node) {
    // ACTIVE ?
    
    $qb = $this->createQueryBuilder('node');
    $qb
        ->where($qb->expr()->lte('node.lft', $node->getLft()))
        ->andWhere($qb->expr()->gte('node.rgt', $node->getRgt()))
        ->andWhere('node.context = :context')
        ->orderBy('node.lft', 'ASC')
    ;
    
    /*
    if (isset($config['root'])) {
        $rootId = $wrapped->getPropertyValue($config['root']);
        $qb->andWhere($rootId === null ?
            $qb->expr()->isNull('node.'.$config['root']) :
            $qb->expr()->eq('node.'.$config['root'], is_string($rootId) ? $qb->expr()->literal($rootId) : $rootId)
        );
    }
    */
    $query = $qb->getQuery()->setParameter('context', $node->getContext());
    
    return $query->getResult();
  }
public function getPath ( $ node ) { // ACTIVE ? $ qb = $ this -> createQueryBuilder ( 'node' ) ; $ qb -> where ( $ qb -> expr ( ) -> lte ( 'node.lft' , $ node -> getLft ( ) ) ) -> andWhere ( $ qb -> expr ( ) -> gte ( 'node.rgt' , $ node -> getRgt ( ) ) ) -> andWhere ( 'node.context = :context' ) -> orderBy ( 'node.lft' , 'ASC' ) ; /*
    if (isset($config['root'])) {
        $rootId = $wrapped->getPropertyValue($config['root']);
        $qb->andWhere($rootId === null ?
            $qb->expr()->isNull('node.'.$config['root']) :
            $qb->expr()->eq('node.'.$config['root'], is_string($rootId) ? $qb->expr()->literal($rootId) : $rootId)
        );
    }
    */ $ query = $ qb -> getQuery ( ) -> setParameter ( 'context' , $ node -> getContext ( ) ) ; return $ query -> getResult ( ) ; }
Get the path of a node

the path first element is the root node
the last node is $node itself
@param object $node
@return array()
Get the path of a node