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