ProductCategory::AllChildCategoryIDs PHP Method

AllChildCategoryIDs() public method

Loop down each level of children to get all ids.
public AllChildCategoryIDs ( )
    public function AllChildCategoryIDs()
    {
        $ids = array($this->ID);
        $allids = array();
        do {
            $ids = ProductCategory::get()->filter('ParentID', $ids)->getIDList();
            $allids += $ids;
        } while (!empty($ids));
        return $allids;
    }