public function getChildren(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if (null === $this->collNestedSetChildren || null !== $criteria) {
            if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
                // return empty collection
                $this->initNestedSetChildren();
            } else {
                $collNestedSetChildren = ChildCategoryQuery::create(null, $criteria)
                    ->childrenOf($this)
                    ->orderByBranch()
                    ->find($con);
                if (null !== $criteria) {
                    return $collNestedSetChildren;
                }
                $this->collNestedSetChildren = $collNestedSetChildren;
            }
        }

        return $this->collNestedSetChildren;
    }
public function getChildren(Criteria $criteria = null, ConnectionInterface $con = null)
    {
        if (null === $this->collNestedSetChildren || null !== $criteria) {
            if ($this->isLeaf() || ($this->isNew() && null === $this->collNestedSetChildren)) {
                // return empty collection
                $this->initNestedSetChildren();
            } else {
                $collNestedSetChildren = ChildCategoryQuery::create(null, $criteria)
                    ->childrenOf($this)
                    ->orderByBranch()
                    ->find($con);
                if (null !== $criteria) {
                    return $collNestedSetChildren;
                }
                $this->collNestedSetChildren = $collNestedSetChildren;
            }
        }

        return $this->collNestedSetChildren;
    }
public function getChildren ( Criteria $ criteria = null , ConnectionInterface $ con = null ) { if ( null === $ this -> collNestedSetChildren || null !== $ criteria ) { if ( $ this -> isLeaf ( ) || ( $ this -> isNew ( ) && null === $ this -> collNestedSetChildren ) ) { // return empty collection $ this -> initNestedSetChildren ( ) ; } else { $ collNestedSetChildren = ChildCategoryQuery :: create ( null , $ criteria ) -> childrenOf ( $ this ) -> orderByBranch ( ) -> find ( $ con ) ; if ( null !== $ criteria ) { return $ collNestedSetChildren ; } $ this -> collNestedSetChildren = $ collNestedSetChildren ; } } return $ this -> collNestedSetChildren ; }
Gets the children of the given node

@param      Criteria  $criteria Criteria to filter results.
@param      ConnectionInterface $con Connection to use.
@return     ObjectCollection|ChildCategory[] List of ChildCategory objects
Gets the children of the given node