private function findChildNodeWithKey($parentId, $key)
	{
        $result = array();
        $relations = $this->getRelations();

        if (isset($relations[RelationBuilder::TREE_PARAM_PARENTS][$parentId])) {
            foreach ($relations[RelationBuilder::TREE_PARAM_PARENTS][$parentId] as $id) {
                // Current found node
                $node = $relations[RelationBuilder::TREE_PARAM_ITEMS][$id][$key];

                $result = array_merge($result, $this->findChildNodeWithKey($id, $key));
                $result[] = $node;
            }
        }

        return $result;
    }
private function findChildNodeWithKey($parentId, $key)
	{
        $result = array();
        $relations = $this->getRelations();

        if (isset($relations[RelationBuilder::TREE_PARAM_PARENTS][$parentId])) {
            foreach ($relations[RelationBuilder::TREE_PARAM_PARENTS][$parentId] as $id) {
                // Current found node
                $node = $relations[RelationBuilder::TREE_PARAM_ITEMS][$id][$key];

                $result = array_merge($result, $this->findChildNodeWithKey($id, $key));
                $result[] = $node;
            }
        }

        return $result;
    }
private function findChildNodeWithKey ( $ parentId , $ key ) { $ result = array ( ) ; $ relations = $ this -> getRelations ( ) ; if ( isset ( $ relations [ RelationBuilder :: TREE_PARAM_PARENTS ] [ $ parentId ] ) ) { foreach ( $ relations [ RelationBuilder :: TREE_PARAM_PARENTS ] [ $ parentId ] as $ id ) { // Current found node $ node = $ relations [ RelationBuilder :: TREE_PARAM_ITEMS ] [ $ id ] [ $ key ] ; $ result = array_merge ( $ result , $ this -> findChildNodeWithKey ( $ id , $ key ) ) ; $ result [ ] = $ node ; } } return $ result ; }
Finds all child nodes including a key

@param string $parentId
@param string $key
@return array
Finds all child nodes including a key