/** * Counts all associated InventoryLocations * @return int */ public function CountInventoryLocations() { if (is_null($this->intInventoryModelId)) { return 0; } return InventoryLocation::CountByInventoryModelId($this->intInventoryModelId); }