Service/CategoryService.php
private function buildNode($node, $references, $tree, $maxLevel)
    {
        if ($node->getId() == $this->getCurrentCategoryId()) {
            $node->setCurrent(true);
            $this->currentLeaf = $node;
        }

        $references[$node->getId()] = $node;

        if ($node->getParentId() == $this->rootId) {
            $this->buildRootNode($node, $tree, 1);
        } else {
            $this->buildChildNode($node, $references, $maxLevel);
        }
    }
private function buildNode($node, $references, $tree, $maxLevel)
    {
        if ($node->getId() == $this->getCurrentCategoryId()) {
            $node->setCurrent(true);
            $this->currentLeaf = $node;
        }

        $references[$node->getId()] = $node;

        if ($node->getParentId() == $this->rootId) {
            $this->buildRootNode($node, $tree, 1);
        } else {
            $this->buildChildNode($node, $references, $maxLevel);
        }
    }
private function buildNode ( $ node , $ references , $ tree , $ maxLevel ) { if ( $ node -> getId ( ) == $ this -> getCurrentCategoryId ( ) ) { $ node -> setCurrent ( true ) ; $ this -> currentLeaf = $ node ; } $ references [ $ node -> getId ( ) ] = $ node ; if ( $ node -> getParentId ( ) == $ this -> rootId ) { $ this -> buildRootNode ( $ node , $ tree , 1 ) ; } else { $ this -> buildChildNode ( $ node , $ references , $ maxLevel ) ; } }
Builds a node. Sets node parameters.

@param AbstractCategoryDocument $node
@param \ArrayIterator           $references
@param \ArrayIterator           $tree
@param int                      $maxLevel
Builds a node . Sets node parameters .