src/DcSiteBundle/Entity/TestDriveRoutes.php line 9

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