src/CoreBundle/Entity/Vehicles/ConfiguratorInterier.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity\Vehicles;
  3. use Application\Sonata\MediaBundle\Entity\Media;
  4. use Application\Sonata\MediaBundle\Entity\Gallery;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. /**
  8.  * ConfiguratorInterier
  9.  */
  10. class ConfiguratorInterier
  11. {
  12.     /**
  13.      * @var integer
  14.      */
  15.     private $id;
  16.     /**
  17.      * @var integer
  18.      */
  19.     private $state;
  20.     /**
  21.      * @var string
  22.      */
  23.     private $name_ru;
  24.     /**
  25.      * @var string
  26.      */
  27.     private $name_ua;
  28.     /**
  29.      * @var string
  30.      */
  31.     private $description_ru;
  32.     /**
  33.      * @var string
  34.      */
  35.     private $description_ua;
  36.     /**
  37.      * @var integer
  38.      */
  39.     private $price;
  40.     /**
  41.      * @var integer
  42.      */
  43.     private $price_uah;
  44.     /**
  45.      * @var Media
  46.      */
  47.     private $image;
  48.     /**
  49.      * @var Gallery
  50.      */
  51.     private $gallery;
  52.     /**
  53.      * @var Vehicle
  54.      */
  55.     private $vehicle;
  56.     /**
  57.      * Get id
  58.      *
  59.      * @return integer
  60.      */
  61.     public function getId()
  62.     {
  63.         return $this->id;
  64.     }
  65.     /**
  66.      * Set state
  67.      *
  68.      * @param integer $state
  69.      *
  70.      * @return ConfiguratorInterier
  71.      */
  72.     public function setState($state)
  73.     {
  74.         $this->state $state;
  75.         return $this;
  76.     }
  77.     /**
  78.      * Get state
  79.      *
  80.      * @return integer
  81.      */
  82.     public function getState()
  83.     {
  84.         return $this->state;
  85.     }
  86.     /**
  87.      * Set nameRu
  88.      *
  89.      * @param string $nameRu
  90.      *
  91.      * @return ConfiguratorInterier
  92.      */
  93.     public function setNameRu($nameRu)
  94.     {
  95.         $this->name_ru $nameRu;
  96.         return $this;
  97.     }
  98.     /**
  99.      * Get nameRu
  100.      *
  101.      * @return string
  102.      */
  103.     public function getNameRu()
  104.     {
  105.         return $this->name_ru;
  106.     }
  107.     /**
  108.      * Set nameUa
  109.      *
  110.      * @param string $nameUa
  111.      *
  112.      * @return ConfiguratorInterier
  113.      */
  114.     public function setNameUa($nameUa)
  115.     {
  116.         $this->name_ua $nameUa;
  117.         return $this;
  118.     }
  119.     /**
  120.      * Get nameUa
  121.      *
  122.      * @return string
  123.      */
  124.     public function getNameUa()
  125.     {
  126.         return $this->name_ua;
  127.     }
  128.     /**
  129.      * Set price
  130.      *
  131.      * @param integer $price
  132.      *
  133.      * @return ConfiguratorInterier
  134.      */
  135.     public function setPrice($price)
  136.     {
  137.         $this->price $price;
  138.         return $this;
  139.     }
  140.     /**
  141.      * Get price
  142.      *
  143.      * @return integer
  144.      */
  145.     public function getPrice()
  146.     {
  147.         return $this->price;
  148.     }
  149.     /**
  150.      * Set priceUah
  151.      *
  152.      * @param integer $priceUah
  153.      *
  154.      * @return ConfiguratorInterier
  155.      */
  156.     public function setPriceUah($priceUah)
  157.     {
  158.         $this->price_uah $priceUah;
  159.         return $this;
  160.     }
  161.     /**
  162.      * Get priceUah
  163.      *
  164.      * @return integer
  165.      */
  166.     public function getPriceUah()
  167.     {
  168.         return $this->price_uah;
  169.     }
  170.     /**
  171.      * Set image
  172.      *
  173.      * @param Media $image
  174.      *
  175.      * @return ConfiguratorInterier
  176.      */
  177.     public function setImage(Media $image null)
  178.     {
  179.         $this->image $image;
  180.         return $this;
  181.     }
  182.     /**
  183.      * Get image
  184.      *
  185.      * @return Media
  186.      */
  187.     public function getImage()
  188.     {
  189.         return $this->image;
  190.     }
  191.     /**
  192.      * Set gallery
  193.      *
  194.      * @param Gallery $gallery
  195.      *
  196.      * @return ConfiguratorInterier
  197.      */
  198.     public function setGallery(Gallery $gallery null)
  199.     {
  200.         $this->gallery $gallery;
  201.         return $this;
  202.     }
  203.     /**
  204.      * Get gallery
  205.      *
  206.      * @return Gallery
  207.      */
  208.     public function getGallery()
  209.     {
  210.         return $this->gallery;
  211.     }
  212.     /**
  213.      * Set vehicle
  214.      *
  215.      * @param Vehicle $vehicle
  216.      *
  217.      * @return ConfiguratorInterier
  218.      */
  219.     public function setVehicle(Vehicle $vehicle null)
  220.     {
  221.         $this->vehicle $vehicle;
  222.         return $this;
  223.     }
  224.     /**
  225.      * Get vehicle
  226.      *
  227.      * @return Vehicle
  228.      */
  229.     public function getVehicle()
  230.     {
  231.         return $this->vehicle;
  232.     }
  233.     public function __toString()
  234.     {
  235.         return (string) $this->getNameRu();
  236.     }
  237.     /**
  238.      * @var Collection
  239.      */
  240.     private $equipments;
  241.     /**
  242.      * Constructor
  243.      */
  244.     public function __construct()
  245.     {
  246.         $this->equipments = new ArrayCollection();
  247.     }
  248.     /**
  249.      * Add equipment
  250.      *
  251.      * @param Equipment $equipment
  252.      *
  253.      * @return ConfiguratorInterier
  254.      */
  255.     public function addEquipment(Equipment $equipment)
  256.     {
  257.         $this->equipments[] = $equipment;
  258.         return $this;
  259.     }
  260.     /**
  261.      * Remove equipment
  262.      *
  263.      * @param Equipment $equipment
  264.      */
  265.     public function removeEquipment(Equipment $equipment)
  266.     {
  267.         $this->equipments->removeElement($equipment);
  268.     }
  269.     /**
  270.      * Get equipments
  271.      *
  272.      * @return Collection
  273.      */
  274.     public function getEquipments()
  275.     {
  276.         return $this->equipments;
  277.     }
  278.     public function clearEquipments()
  279.     {
  280.         $this->equipments->clear();
  281.     }
  282.     /**
  283.      * Set descriptionRu
  284.      *
  285.      * @param string $descriptionRu
  286.      *
  287.      * @return ConfiguratorInterier
  288.      */
  289.     public function setDescriptionRu($descriptionRu)
  290.     {
  291.         $this->description_ru $descriptionRu;
  292.         return $this;
  293.     }
  294.     /**
  295.      * Get descriptionRu
  296.      *
  297.      * @return string
  298.      */
  299.     public function getDescriptionRu()
  300.     {
  301.         return $this->description_ru;
  302.     }
  303.     /**
  304.      * Set descriptionUa
  305.      *
  306.      * @param string $descriptionUa
  307.      *
  308.      * @return ConfiguratorInterier
  309.      */
  310.     public function setDescriptionUa($descriptionUa)
  311.     {
  312.         $this->description_ua $descriptionUa;
  313.         return $this;
  314.     }
  315.     /**
  316.      * Get descriptionUa
  317.      *
  318.      * @return string
  319.      */
  320.     public function getDescriptionUa()
  321.     {
  322.         return $this->description_ua;
  323.     }
  324.     public function getDescriptionByLocale($locale 'ru')
  325.     {
  326.         if($locale == 'ru') {
  327.             return $this->getDescriptionRu();
  328.         }
  329.         return $this->getDescriptionUa();
  330.     }
  331. }