<?phpnamespace DcSiteBundle\Entity;use Application\Sonata\MediaBundle\Entity\Media;use CoreBundle\Entity\Dealer;use DateTime;/** * TermsMaintenance */class TermsMaintenance{ /** * @var int */ private $id; /** * @var string */ private $title_ua; /** * @var string */ private $title_ru; /** * @var DateTime */ private $begin_date; /** * @var int */ private $type; /** * @var Media */ private $file; /** * @var Dealer */ private $dealer; /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set titleUa. * * @param string $titleUa * * @return TermsMaintenance */ public function setTitleUa($titleUa) { $this->title_ua = $titleUa; return $this; } /** * Get titleUa. * * @return string */ public function getTitleUa() { return $this->title_ua; } /** * Set titleRu. * * @param string $titleRu * * @return TermsMaintenance */ public function setTitleRu($titleRu) { $this->title_ru = $titleRu; return $this; } /** * Get titleRu. * * @return string */ public function getTitleRu() { return $this->title_ru; } /** * Set beginDate. * * @param DateTime $beginDate * * @return TermsMaintenance */ public function setBeginDate($beginDate) { $this->begin_date = $beginDate; return $this; } /** * Get beginDate. * * @return DateTime */ public function getBeginDate() { return $this->begin_date; } /** * Set type. * * @param int $type * * @return TermsMaintenance */ public function setType($type) { $this->type = $type; return $this; } /** * Get type. * * @return int */ public function getType() { return $this->type; } /** * Set file. * * @param Media|null $file * * @return TermsMaintenance */ public function setFile(Media $file = null) { $this->file = $file; return $this; } /** * Get file. * * @return Media|null */ public function getFile() { return $this->file; } /** * Set dealer. * * @param Dealer|null $dealer * * @return TermsMaintenance */ public function setDealer(Dealer $dealer = null) { $this->dealer = $dealer; return $this; } /** * Get dealer. * * @return Dealer|null */ public function getDealer() { return $this->dealer; } public function getTitle($lang) { return $lang == 'ua' ? $this->getTitleUa() : $this->getTitleRu(); }}