src/CoreBundle/Entity/Vehicles/CharacteristicValue.php line 8

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity\Vehicles;
  3. /**
  4.  * CharacteristicValue
  5.  */
  6. class CharacteristicValue
  7. {
  8.     /**
  9.      * @var integer
  10.      */
  11.     private $id;
  12.     /**
  13.      * @var string
  14.      */
  15.     private $value_ua;
  16.     /**
  17.      * @var string
  18.      */
  19.     private $value_ru;
  20.     /**
  21.      * @var Characteristic
  22.      */
  23.     private $characteristic;
  24.     /**
  25.      * Get id
  26.      *
  27.      * @return integer
  28.      */
  29.     public function getId()
  30.     {
  31.         return $this->id;
  32.     }
  33.     /**
  34.      * Set valueUa
  35.      *
  36.      * @param string $valueUa
  37.      *
  38.      * @return CharacteristicValue
  39.      */
  40.     public function setValueUa($valueUa)
  41.     {
  42.         $this->value_ua $valueUa;
  43.         return $this;
  44.     }
  45.     /**
  46.      * Get valueUa
  47.      *
  48.      * @return string
  49.      */
  50.     public function getValueUa()
  51.     {
  52.         return $this->value_ua;
  53.     }
  54.     /**
  55.      * Set valueRu
  56.      *
  57.      * @param string $valueRu
  58.      *
  59.      * @return CharacteristicValue
  60.      */
  61.     public function setValueRu($valueRu)
  62.     {
  63.         $this->value_ru $valueRu;
  64.         return $this;
  65.     }
  66.     /**
  67.      * Get valueRu
  68.      *
  69.      * @return string
  70.      */
  71.     public function getValueRu()
  72.     {
  73.         return $this->value_ru;
  74.     }
  75.     /**
  76.      * Set characteristic
  77.      *
  78.      * @param Characteristic $characteristic
  79.      *
  80.      * @return CharacteristicValue
  81.      */
  82.     public function setCharacteristic(Characteristic $characteristic null)
  83.     {
  84.         $this->characteristic $characteristic;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get characteristic
  89.      *
  90.      * @return Characteristic
  91.      */
  92.     public function getCharacteristic()
  93.     {
  94.         return $this->characteristic;
  95.     }
  96.     public function __toString()
  97.     {
  98.         return (string) $this->getValueRu();
  99.     }
  100.     public function getValue($locale)
  101.     {
  102.         return $locale == 'ru' $this->getValueRu() : $this->getValueUa();
  103.     }
  104.     /**
  105.      * @var string
  106.      */
  107.     private $url;
  108.     /**
  109.      * Set url
  110.      *
  111.      * @param string $url
  112.      *
  113.      * @return CharacteristicValue
  114.      */
  115.     public function setUrl($url)
  116.     {
  117.         $this->url $url;
  118.         return $this;
  119.     }
  120.     /**
  121.      * Get url
  122.      *
  123.      * @return string
  124.      */
  125.     public function getUrl()
  126.     {
  127.         return $this->url;
  128.     }
  129.     /**
  130.      * @var boolean
  131.      */
  132.     private $is_action 1;
  133.     /**
  134.      * @var integer
  135.      */
  136.     private $position;
  137.     /**
  138.      * Set isAction
  139.      *
  140.      * @param boolean $isAction
  141.      *
  142.      * @return CharacteristicValue
  143.      */
  144.     public function setIsAction($isAction)
  145.     {
  146.         $this->is_action $isAction;
  147.         return $this;
  148.     }
  149.     /**
  150.      * Get isAction
  151.      *
  152.      * @return boolean
  153.      */
  154.     public function getIsAction()
  155.     {
  156.         return $this->is_action;
  157.     }
  158.     /**
  159.      * Set position
  160.      *
  161.      * @param integer $position
  162.      *
  163.      * @return CharacteristicValue
  164.      */
  165.     public function setPosition($position)
  166.     {
  167.         $this->position $position;
  168.         return $this;
  169.     }
  170.     /**
  171.      * Get position
  172.      *
  173.      * @return integer
  174.      */
  175.     public function getPosition()
  176.     {
  177.         return $this->position;
  178.     }
  179. }