/** * Counts all associated InventoryModels * @return int */ public function CountInventoryModels() { if (is_null($this->intManufacturerId)) { return 0; } return InventoryModel::CountByManufacturerId($this->intManufacturerId); }