<?phpnamespace CoreBundle\Entity;use Doctrine\Common\Collections\Collection;/** * AutoRiaOptions */class AutoRiaOptions{ /** * @var int */ private $id; /** * @var int */ private $autoria_id; /** * @var string */ private $title_ru; /** * @var string */ private $title_ua; /** * @var Collection */ private $vehicles; /** * @var Collection */ protected $vehicle_auto_ria_options; /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set autoriaId * * @param string $autoriaId * */ public function setAutoriaId($autoriaId) { $this->autoria_id = $autoriaId; return $this; } /** * Get autoriaId * * @return string */ public function getAutoriaId() { return $this->autoria_id; } /** * Set titleRu * * @param string $titleRu * */ public function setTitleRu($titleRu) { $this->title_ru = $titleRu; return $this; } /** * Get titleRu * * @return string */ public function getTitleRu() { return $this->title_ru; } /** * Set titleUa * * @param string $titleUa * */ public function setTitleUa($titleUa) { $this->title_ua = $titleUa; return $this; } /** * Get titleUa * * @return string */ public function getTitleUa() { return $this->title_ua; } /** * Get vehicles. * * @return Collection */ public function getVehicles() { return $this->vehicles; } public function getTitle($locale) { if ($locale == 'ru' && $this->title_ru){ return $this->title_ru; } return $this->title_ua; } public function getVehicleAutoRiaOptions(): Collection { return $this->vehicle_auto_ria_options; } public function __toString(): string { return $this->getTitleUa(); }}