customers = new ArrayCollection(); $this->batteries = new ArrayCollection(); } public function getID() { return $this->id; } public function setManufacturer($manufacturer) { $this->manufacturer = $manufacturer; return $this; } public function getManufacturer() { return $this->manufacturer; } public function setMake($make) { $this->make = $make; return $this; } public function getMake() { return $this->make; } public function setModelYearFrom($model_year_from) { $this->model_year_from = $model_year_from; return $this; } public function getModelYearFrom() { return $this->model_year_from; } public function setModelYearTo($model_year_to) { $this->model_year_to = $model_year_to; return $this; } public function getModelYearTo() { return $this->model_year_to; } public function getModelYearFormatted() { if ($this->model_year_from == 0) { if ($this->model_year_to == 0) return '-'; return $this->model_year_to; } if ($this->model_year_to == 0) return $this->model_year_from; return $this->model_year_from . ' - ' . $this->model_year_to; } public function addBattery(Battery $battery) { $this->batteries->add($battery); return $this; } public function clearBatteries() { $this->batteries->clear(); return $this; } public function getBatteries() { return $this->batteries; } }