src/Titon/Db/Behavior/HierarchyBehavior.php
public function getPath($id) {
        $node = $this->getNode($id);

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

        $left = $this->getConfig('leftField');
        $right = $this->getConfig('rightField');

        return $this->getRepository()->select()
            ->where($left, '<', $node[$left])
            ->where($right, '>', $node[$right])
            ->orderBy($left, 'asc')
            ->all();
    }
public function getPath($id) {
        $node = $this->getNode($id);

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

        $left = $this->getConfig('leftField');
        $right = $this->getConfig('rightField');

        return $this->getRepository()->select()
            ->where($left, '<', $node[$left])
            ->where($right, '>', $node[$right])
            ->orderBy($left, 'asc')
            ->all();
    }
public function getPath ( $ id ) { $ node = $ this -> getNode ( $ id ) ; if ( ! $ node ) { return [ ] ; } $ left = $ this -> getConfig ( 'leftField' ) ; $ right = $ this -> getConfig ( 'rightField' ) ; return $ this -> getRepository ( ) -> select ( ) -> where ( $ left , '<' , $ node [ $ left ] ) -> where ( $ right , '>' , $ node [ $ right ] ) -> orderBy ( $ left , 'asc' ) -> all ( ) ; }
Return the hierarchical path to the current node.

@param int $id
@return \Titon\Db\EntityCollection
Return the hierarchical path to the current node .