CategoryModel::hasChildren PHP Method

hasChildren() public method

Check whether category has any children categories.
Since: 2.0.0
public hasChildren ( string $CategoryID ) : boolean
$CategoryID string Unique ID for category being checked.
return boolean
    public function hasChildren($CategoryID)
    {
        $ChildData = $this->SQL->select('CategoryID')->from('Category')->where('ParentCategoryID', $CategoryID)->get();
        return $ChildData->numRows() > 0 ? true : false;
    }