src/DcSiteBundle/Entity/TermsMaintenance.php line 12

Open in your IDE?
  1. <?php
  2. namespace DcSiteBundle\Entity;
  3. use Application\Sonata\MediaBundle\Entity\Media;
  4. use CoreBundle\Entity\Dealer;
  5. use DateTime;
  6. /**
  7.  * TermsMaintenance
  8.  */
  9. class TermsMaintenance
  10. {
  11.     /**
  12.      * @var int
  13.      */
  14.     private $id;
  15.     /**
  16.      * @var string
  17.      */
  18.     private $title_ua;
  19.     /**
  20.      * @var string
  21.      */
  22.     private $title_ru;
  23.     /**
  24.      * @var DateTime
  25.      */
  26.     private $begin_date;
  27.     /**
  28.      * @var int
  29.      */
  30.     private $type;
  31.     /**
  32.      * @var Media
  33.      */
  34.     private $file;
  35.     /**
  36.      * @var Dealer
  37.      */
  38.     private $dealer;
  39.     /**
  40.      * Get id.
  41.      *
  42.      * @return int
  43.      */
  44.     public function getId()
  45.     {
  46.         return $this->id;
  47.     }
  48.     /**
  49.      * Set titleUa.
  50.      *
  51.      * @param string $titleUa
  52.      *
  53.      * @return TermsMaintenance
  54.      */
  55.     public function setTitleUa($titleUa)
  56.     {
  57.         $this->title_ua $titleUa;
  58.         return $this;
  59.     }
  60.     /**
  61.      * Get titleUa.
  62.      *
  63.      * @return string
  64.      */
  65.     public function getTitleUa()
  66.     {
  67.         return $this->title_ua;
  68.     }
  69.     /**
  70.      * Set titleRu.
  71.      *
  72.      * @param string $titleRu
  73.      *
  74.      * @return TermsMaintenance
  75.      */
  76.     public function setTitleRu($titleRu)
  77.     {
  78.         $this->title_ru $titleRu;
  79.         return $this;
  80.     }
  81.     /**
  82.      * Get titleRu.
  83.      *
  84.      * @return string
  85.      */
  86.     public function getTitleRu()
  87.     {
  88.         return $this->title_ru;
  89.     }
  90.     /**
  91.      * Set beginDate.
  92.      *
  93.      * @param DateTime $beginDate
  94.      *
  95.      * @return TermsMaintenance
  96.      */
  97.     public function setBeginDate($beginDate)
  98.     {
  99.         $this->begin_date $beginDate;
  100.         return $this;
  101.     }
  102.     /**
  103.      * Get beginDate.
  104.      *
  105.      * @return DateTime
  106.      */
  107.     public function getBeginDate()
  108.     {
  109.         return $this->begin_date;
  110.     }
  111.     /**
  112.      * Set type.
  113.      *
  114.      * @param int $type
  115.      *
  116.      * @return TermsMaintenance
  117.      */
  118.     public function setType($type)
  119.     {
  120.         $this->type $type;
  121.         return $this;
  122.     }
  123.     /**
  124.      * Get type.
  125.      *
  126.      * @return int
  127.      */
  128.     public function getType()
  129.     {
  130.         return $this->type;
  131.     }
  132.     /**
  133.      * Set file.
  134.      *
  135.      * @param Media|null $file
  136.      *
  137.      * @return TermsMaintenance
  138.      */
  139.     public function setFile(Media $file null)
  140.     {
  141.         $this->file $file;
  142.         return $this;
  143.     }
  144.     /**
  145.      * Get file.
  146.      *
  147.      * @return Media|null
  148.      */
  149.     public function getFile()
  150.     {
  151.         return $this->file;
  152.     }
  153.     /**
  154.      * Set dealer.
  155.      *
  156.      * @param Dealer|null $dealer
  157.      *
  158.      * @return TermsMaintenance
  159.      */
  160.     public function setDealer(Dealer $dealer null)
  161.     {
  162.         $this->dealer $dealer;
  163.         return $this;
  164.     }
  165.     /**
  166.      * Get dealer.
  167.      *
  168.      * @return Dealer|null
  169.      */
  170.     public function getDealer()
  171.     {
  172.         return $this->dealer;
  173.     }
  174.     public function getTitle($lang)
  175.     {
  176.         return $lang == 'ua' $this->getTitleUa() : $this->getTitleRu();
  177.     }
  178. }