public function getChildren($parentID)
    {
        $tmp = [];
        foreach($this->categoryList as $key => $item){
            if($item->parentID == $parentID) {
                $tmp[] = $item;
            }
        }

        return $tmp;
    }
public function getChildren($parentID)
    {
        $tmp = [];
        foreach($this->categoryList as $key => $item){
            if($item->parentID == $parentID) {
                $tmp[] = $item;
            }
        }

        return $tmp;
    }
public function getChildren ( $ parentID ) { $ tmp = [ ] ; foreach ( $ this -> categoryList as $ key => $ item ) { if ( $ item -> parentID == $ parentID ) { $ tmp [ ] = $ item ; } } return $ tmp ; }
Get children of a category.

@param  $parentID
@return array
Get children of a category .