src/PortalBundle/Entity/BlogCategory.php line 8

Open in your IDE?
  1. <?php
  2. namespace PortalBundle\Entity;
  3. /**
  4.  * BlogCategory
  5.  */
  6. class BlogCategory
  7. {
  8.     /**
  9.      * @var int
  10.      */
  11.     private $id;
  12.     /**
  13.      * @var string
  14.      */
  15.     private $title_ua;
  16.     /**
  17.      * @var string
  18.      */
  19.     private $title_ru;
  20.     /**
  21.      * @var bool
  22.      */
  23.     private $state;
  24.     /**
  25.      * Get id.
  26.      *
  27.      * @return int
  28.      */
  29.     public function getId()
  30.     {
  31.         return $this->id;
  32.     }
  33.     /**
  34.      * Set titleUa.
  35.      *
  36.      * @param string $titleUa
  37.      *
  38.      * @return BlogCategory
  39.      */
  40.     public function setTitleUa($titleUa)
  41.     {
  42.         $this->title_ua $titleUa;
  43.         return $this;
  44.     }
  45.     /**
  46.      * Get titleUa.
  47.      *
  48.      * @return string
  49.      */
  50.     public function getTitleUa()
  51.     {
  52.         return $this->title_ua;
  53.     }
  54.     /**
  55.      * Set titleRu.
  56.      *
  57.      * @param string $titleRu
  58.      *
  59.      * @return BlogCategory
  60.      */
  61.     public function setTitleRu($titleRu)
  62.     {
  63.         $this->title_ru $titleRu;
  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 state.
  77.      *
  78.      * @param bool $state
  79.      *
  80.      * @return BlogCategory
  81.      */
  82.     public function setState($state)
  83.     {
  84.         $this->state $state;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get state.
  89.      *
  90.      * @return bool
  91.      */
  92.     public function getState()
  93.     {
  94.         return $this->state;
  95.     }
  96.     public function __toString()
  97.     {
  98.         return $this->title_ua;
  99.     }
  100.     public function getTitle($locale)
  101.     {
  102.         return $locale == 'ru' $this->getTitleRu() : $this->getTitleUa();
  103.     }
  104.     /**
  105.      * @var string
  106.      */
  107.     private $url;
  108.     /**
  109.      * Set url.
  110.      *
  111.      * @param string $url
  112.      *
  113.      * @return BlogCategory
  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. }