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