src/DcSiteBundle/Entity/Events.php line 12

Open in your IDE?
  1. <?php
  2. namespace DcSiteBundle\Entity;
  3. use Application\Sonata\MediaBundle\Entity\Gallery;
  4. use Application\Sonata\MediaBundle\Entity\Media;
  5. use CoreBundle\Entity\Dealer;
  6. /**
  7.  * Events
  8.  */
  9. class Events
  10. {
  11.     /**
  12.      * @var int
  13.      */
  14.     private $id;
  15.     /**
  16.      * @var string
  17.      */
  18.     private $name_ru;
  19.     /**
  20.      * @var string
  21.      */
  22.     private $name_ua;
  23.     /**
  24.      * @var Media
  25.      */
  26.     private $content;
  27.     /**
  28.      * @var Dealer
  29.      */
  30.     private $dealer;
  31.     public function __toString()
  32.     {
  33.         return (string)$this->getNameRu();
  34.     }
  35.     /**
  36.      * Get id
  37.      *
  38.      * @return int
  39.      */
  40.     public function getId()
  41.     {
  42.         return $this->id;
  43.     }
  44.     /**
  45.      * Set nameRu
  46.      *
  47.      * @param string $nameRu
  48.      *
  49.      * @return Events
  50.      */
  51.     public function setNameRu($nameRu)
  52.     {
  53.         $this->name_ru $nameRu;
  54.         return $this;
  55.     }
  56.     /**
  57.      * Get nameRu
  58.      *
  59.      * @return string
  60.      */
  61.     public function getNameRu()
  62.     {
  63.         return $this->name_ru;
  64.     }
  65.     /**
  66.      * Set nameUa
  67.      *
  68.      * @param string $nameUa
  69.      *
  70.      * @return Events
  71.      */
  72.     public function setNameUa($nameUa)
  73.     {
  74.         $this->name_ua $nameUa;
  75.         return $this;
  76.     }
  77.     /**
  78.      * Get nameUa
  79.      *
  80.      * @return string
  81.      */
  82.     public function getNameUa()
  83.     {
  84.         return $this->name_ua;
  85.     }
  86.     /**
  87.      * Set content
  88.      *
  89.      * @param Media $content
  90.      *
  91.      * @return Events
  92.      */
  93.     public function setContent(Media $content)
  94.     {
  95.         $this->content $content;
  96.         return $this;
  97.     }
  98.     /**
  99.      * Get content
  100.      *
  101.      * @return Media
  102.      */
  103.     public function getContent()
  104.     {
  105.         return $this->content;
  106.     }
  107.     /**
  108.      * Set dealer
  109.      *
  110.      * @param Dealer $dealer
  111.      *
  112.      * @return Events
  113.      */
  114.     public function setDealer(Dealer $dealer)
  115.     {
  116.         $this->dealer $dealer;
  117.         return $this;
  118.     }
  119.     /**
  120.      * Get dealer
  121.      *
  122.      * @return Dealer
  123.      */
  124.     public function getDealer()
  125.     {
  126.         return $this->dealer;
  127.     }
  128.     /**
  129.      * @param string $locale
  130.      * @return string
  131.      */
  132.     public function getName($locale 'ru')
  133.     {
  134.         return $locale === 'ru' $this->getNameRu() : $this->getNameUa();
  135.     }
  136. }