<?phpnamespace PortalBundle\Entity;/** * BlogCategory */class BlogCategory{ /** * @var int */ private $id; /** * @var string */ private $title_ua; /** * @var string */ private $title_ru; /** * @var bool */ private $state; /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set titleUa. * * @param string $titleUa * * @return BlogCategory */ public function setTitleUa($titleUa) { $this->title_ua = $titleUa; return $this; } /** * Get titleUa. * * @return string */ public function getTitleUa() { return $this->title_ua; } /** * Set titleRu. * * @param string $titleRu * * @return BlogCategory */ public function setTitleRu($titleRu) { $this->title_ru = $titleRu; return $this; } /** * Get titleRu. * * @return string */ public function getTitleRu() { return $this->title_ru; } /** * Set state. * * @param bool $state * * @return BlogCategory */ public function setState($state) { $this->state = $state; return $this; } /** * Get state. * * @return bool */ public function getState() { return $this->state; } public function __toString() { return $this->title_ua; } public function getTitle($locale) { return $locale == 'ru' ? $this->getTitleRu() : $this->getTitleUa(); } /** * @var string */ private $url; /** * Set url. * * @param string $url * * @return BlogCategory */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url. * * @return string */ public function getUrl() { return $this->url; }}