public function ChildCategories($recursive = false) { $ids = array($this->ID); if ($recursive) { $ids += $this->AllChildCategoryIDs(); } return ProductCategory::get()->filter("ParentID", $ids); }