src/CoreBundle/Entity/ViDiDepartment.php line 10

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. /**
  5.  * ViDiDepartment
  6.  */
  7. class ViDiDepartment
  8. {
  9.     /**
  10.      * @var int
  11.      */
  12.     private $id;
  13.     /**
  14.      * @var string
  15.      */
  16.     private $title_ru;
  17.     /**
  18.      * @var string
  19.      */
  20.     private $title_ua;
  21.     /**
  22.      * @var string
  23.      */
  24.     private $phone;
  25.     /**
  26.      * @var string
  27.      */
  28.     private $email;
  29.     /**
  30.      * @var Dealer
  31.      */
  32.     private $dealer;
  33.     /**
  34.      * @var ViDiWorker
  35.      */
  36.     private $workers;
  37.     public function __construct()
  38.     {
  39.         $this->workers = new ArrayCollection();
  40.     }
  41.     public function __toString()
  42.     {
  43.         return (string)$this->getTitleRu();
  44.     }
  45.     /**
  46.      * Get id
  47.      *
  48.      * @return int
  49.      */
  50.     public function getId()
  51.     {
  52.         return $this->id;
  53.     }
  54.     /**
  55.      * Set titleRu
  56.      *
  57.      * @param string $title_ru
  58.      *
  59.      * @return ViDiDepartment
  60.      */
  61.     public function setTitleRu($title_ru)
  62.     {
  63.         $this->title_ru $title_ru;
  64.         return $this;
  65.     }
  66.     /**
  67.      * Get titleRu
  68.      *
  69.      * @return string
  70.      */
  71.     public function getTitleRu()
  72.     {
  73.         return $this->title_ru;
  74.     }
  75.     /**
  76.      * Set titleUa
  77.      *
  78.      * @param string $title_ua
  79.      *
  80.      * @return ViDiDepartment
  81.      */
  82.     public function setTitleUa($title_ua)
  83.     {
  84.         $this->title_ua $title_ua;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get titleUa
  89.      *
  90.      * @return string
  91.      */
  92.     public function getTitleUa()
  93.     {
  94.         return $this->title_ua;
  95.     }
  96.     /**
  97.      * Set phone
  98.      *
  99.      * @param string $phone
  100.      *
  101.      * @return ViDiDepartment
  102.      */
  103.     public function setPhone($phone)
  104.     {
  105.         $this->phone $phone;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get phone
  110.      *
  111.      * @return string
  112.      */
  113.     public function getPhone()
  114.     {
  115.         return $this->phone;
  116.     }
  117.     /**
  118.      * Set email
  119.      *
  120.      * @param string $email
  121.      *
  122.      * @return ViDiDepartment
  123.      */
  124.     public function setEmail($email)
  125.     {
  126.         $this->email $email;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get email
  131.      *
  132.      * @return string
  133.      */
  134.     public function getEmail()
  135.     {
  136.         return $this->email;
  137.     }
  138.     /**
  139.      * Set dealer
  140.      *
  141.      * @param Dealer $dealer
  142.      *
  143.      * @return ViDiDepartment
  144.      */
  145.     public function setDealer(Dealer $dealer)
  146.     {
  147.         $this->dealer $dealer;
  148.         return $this;
  149.     }
  150.     /**
  151.      * Get dealer
  152.      *
  153.      * @return Dealer
  154.      */
  155.     public function getDealer()
  156.     {
  157.         return $this->dealer;
  158.     }
  159.     /**
  160.      * @param string $locale
  161.      * @return string
  162.      */
  163.     public function getTitle($locale 'ru')
  164.     {
  165.         return $locale === 'ua' $this->getTitleUa() : $this->getTitleRu();
  166.     }
  167.     /**
  168.      * @param ViDiWorker $workers
  169.      * @return ViDiDepartment
  170.      */
  171.     public function setWorkers($workers)
  172.     {
  173.         $this->workers $workers;
  174.         return $this;
  175.     }
  176.     /**
  177.      * @param $worker
  178.      * @return $this
  179.      */
  180.     public function addWorker($worker)
  181.     {
  182.         $this->workers[] = $worker;
  183.         return $this;
  184.     }
  185.     /**
  186.      * @return ViDiWorker
  187.      */
  188.     public function getWorkers()
  189.     {
  190.         return $this->workers;
  191.     }
  192.     /**
  193.      * @var integer
  194.      */
  195.     private $priority;
  196.     /**
  197.      * Set priority
  198.      *
  199.      * @param integer $priority
  200.      *
  201.      * @return ViDiDepartment
  202.      */
  203.     public function setPriority($priority)
  204.     {
  205.         $this->priority $priority;
  206.         return $this;
  207.     }
  208.     /**
  209.      * Get priority
  210.      *
  211.      * @return integer
  212.      */
  213.     public function getPriority()
  214.     {
  215.         return $this->priority;
  216.     }
  217.     /**
  218.      * Remove worker
  219.      *
  220.      * @param ViDiWorker $worker
  221.      */
  222.     public function removeWorker(ViDiWorker $worker)
  223.     {
  224.         $this->workers->removeElement($worker);
  225.     }
  226.     /**
  227.      * @var string
  228.      */
  229.     private $hidden_email;
  230.     /**
  231.      * Set hiddenEmail
  232.      *
  233.      * @param string $hiddenEmail
  234.      *
  235.      * @return ViDiDepartment
  236.      */
  237.     public function setHiddenEmail($hiddenEmail)
  238.     {
  239.         $this->hidden_email $hiddenEmail;
  240.         return $this;
  241.     }
  242.     /**
  243.      * Get hiddenEmail
  244.      *
  245.      * @return string
  246.      */
  247.     public function getHiddenEmail()
  248.     {
  249.         return $this->hidden_email;
  250.     }
  251.     /**
  252.      * @var integer
  253.      */
  254.     private $type;
  255.     /**
  256.      * Set type
  257.      *
  258.      * @param integer $type
  259.      *
  260.      * @return ViDiDepartment
  261.      */
  262.     public function setType($type)
  263.     {
  264.         $this->type $type;
  265.         return $this;
  266.     }
  267.     /**
  268.      * Get type
  269.      *
  270.      * @return integer
  271.      */
  272.     public function getType()
  273.     {
  274.         return $this->type;
  275.     }
  276.     /**
  277.      * @var string
  278.      */
  279.     private $phone_internal;
  280.     /**
  281.      * Set phoneInternal
  282.      *
  283.      * @param string $phoneInternal
  284.      *
  285.      * @return ViDiDepartment
  286.      */
  287.     public function setPhoneInternal($phoneInternal)
  288.     {
  289.         $this->phone_internal $phoneInternal;
  290.         return $this;
  291.     }
  292.     /**
  293.      * Get phoneInternal
  294.      *
  295.      * @return string
  296.      */
  297.     public function getPhoneInternal()
  298.     {
  299.         return $this->phone_internal;
  300.     }
  301. }