src/CoreBundle/Entity/Vehicles/RecommendGroup.php line 12

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity\Vehicles;
  3. use Application\Sonata\MediaBundle\Entity\Media;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. /**
  7.  * RecommendGroup
  8.  */
  9. class RecommendGroup
  10. {
  11.     /**
  12.      * @var integer
  13.      */
  14.     private $id;
  15.     /**
  16.      * @var string
  17.      */
  18.     private $title_ru;
  19.     /**
  20.      * @var string
  21.      */
  22.     private $title_ua;
  23.     /**
  24.      * @var integer
  25.      */
  26.     private $position;
  27.     /**
  28.      * @var string
  29.      */
  30.     private $url;
  31.     /**
  32.      * @var integer
  33.      */
  34.     private $state_slider 1;
  35.     /**
  36.      * @var Media
  37.      */
  38.     private $image;
  39.     /**
  40.      * Get id
  41.      *
  42.      * @return integer
  43.      */
  44.     public function getId()
  45.     {
  46.         return $this->id;
  47.     }
  48.     /**
  49.      * Set titleRu
  50.      *
  51.      * @param string $titleRu
  52.      *
  53.      * @return RecomendGroup
  54.      */
  55.     public function setTitleRu($titleRu)
  56.     {
  57.         $this->title_ru $titleRu;
  58.         return $this;
  59.     }
  60.     /**
  61.      * Get titleRu
  62.      *
  63.      * @return string
  64.      */
  65.     public function getTitleRu()
  66.     {
  67.         return $this->title_ru;
  68.     }
  69.     /**
  70.      * Set titleUa
  71.      *
  72.      * @param string $titleUa
  73.      *
  74.      * @return RecomendGroup
  75.      */
  76.     public function setTitleUa($titleUa)
  77.     {
  78.         $this->title_ua $titleUa;
  79.         return $this;
  80.     }
  81.     /**
  82.      * Get titleUa
  83.      *
  84.      * @return string
  85.      */
  86.     public function getTitleUa()
  87.     {
  88.         return $this->title_ua;
  89.     }
  90.     public function getTitle($locale 'ua')
  91.     {
  92.         return $locale == 'ru' $this->title_ru $this->title_ua;
  93.     }
  94.     /**
  95.      * Set position
  96.      *
  97.      * @param integer $position
  98.      *
  99.      * @return RecomendGroup
  100.      */
  101.     public function setPosition($position)
  102.     {
  103.         $this->position $position;
  104.         return $this;
  105.     }
  106.     /**
  107.      * Get position
  108.      *
  109.      * @return integer
  110.      */
  111.     public function getPosition()
  112.     {
  113.         return $this->position;
  114.     }
  115.     /**
  116.      * Set url
  117.      *
  118.      * @param string $url
  119.      *
  120.      * @return RecomendGroup
  121.      */
  122.     public function setUrl($url)
  123.     {
  124.         $this->url $url;
  125.         return $this;
  126.     }
  127.     /**
  128.      * Get url
  129.      *
  130.      * @return string
  131.      */
  132.     public function getUrl()
  133.     {
  134.         return $this->url;
  135.     }
  136.     /**
  137.      * Set image
  138.      *
  139.      * @param Media $image
  140.      *
  141.      * @return RecomendGroup
  142.      */
  143.     public function setImage(Media $image null)
  144.     {
  145.         $this->image $image;
  146.         return $this;
  147.     }
  148.     /**
  149.      * Get image
  150.      *
  151.      * @return Media
  152.      */
  153.     public function getImage()
  154.     {
  155.         return $this->image;
  156.     }
  157.     public function __toString()
  158.     {
  159.         return (string) $this->title_ru;
  160.     }
  161.     /**
  162.      * @var Collection
  163.      */
  164.     private $vehicles;
  165.     /**
  166.      * Constructor
  167.      */
  168.     public function __construct()
  169.     {
  170.         $this->vehicles = new ArrayCollection();
  171.     }
  172.     /**
  173.      * Add vehicle
  174.      *
  175.      * @param Vehicle $vehicle
  176.      *
  177.      * @return RecommendGroup
  178.      */
  179.     public function addVehicle(Vehicle $vehicle)
  180.     {
  181.         $this->vehicles[] = $vehicle;
  182.         return $this;
  183.     }
  184.     /**
  185.      * Remove vehicle
  186.      *
  187.      * @param Vehicle $vehicle
  188.      */
  189.     public function removeVehicle(Vehicle $vehicle)
  190.     {
  191.         $this->vehicles->removeElement($vehicle);
  192.     }
  193.     /**
  194.      * Get vehicles
  195.      *
  196.      * @return Collection
  197.      */
  198.     public function getVehicles()
  199.     {
  200.         return $this->vehicles;
  201.     }
  202.     /**
  203.      * @var integer
  204.      */
  205.     private $state 1;
  206.     /**
  207.      * Set state
  208.      *
  209.      * @param integer $state
  210.      *
  211.      * @return RecommendGroup
  212.      */
  213.     public function setState($state)
  214.     {
  215.         $this->state $state;
  216.         return $this;
  217.     }
  218.     /**
  219.      * Get state
  220.      *
  221.      * @return integer
  222.      */
  223.     public function getState()
  224.     {
  225.         return (boolean)$this->state;
  226.     }
  227.     /**
  228.      * Set stateSlider
  229.      *
  230.      * @param integer $stateSlider
  231.      *
  232.      * @return RecommendGroup
  233.      */
  234.     public function setStateSlider($stateSlider)
  235.     {
  236.         $this->state_slider $stateSlider;
  237.         return $this;
  238.     }
  239.     /**
  240.      * Get stateSlider
  241.      *
  242.      * @return integer
  243.      */
  244.     public function getStateSlider()
  245.     {
  246.         return (boolean)$this->state_slider;
  247.     }
  248. }