<?php
namespace DcSiteBundle\Entity;
use Application\Sonata\MediaBundle\Entity\Gallery;
use Application\Sonata\MediaBundle\Entity\Media;
use CoreBundle\Entity\Dealer;
/**
* Events
*/
class Events
{
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $name_ru;
/**
* @var string
*/
private $name_ua;
/**
* @var Media
*/
private $content;
/**
* @var Dealer
*/
private $dealer;
public function __toString()
{
return (string)$this->getNameRu();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set nameRu
*
* @param string $nameRu
*
* @return Events
*/
public function setNameRu($nameRu)
{
$this->name_ru = $nameRu;
return $this;
}
/**
* Get nameRu
*
* @return string
*/
public function getNameRu()
{
return $this->name_ru;
}
/**
* Set nameUa
*
* @param string $nameUa
*
* @return Events
*/
public function setNameUa($nameUa)
{
$this->name_ua = $nameUa;
return $this;
}
/**
* Get nameUa
*
* @return string
*/
public function getNameUa()
{
return $this->name_ua;
}
/**
* Set content
*
* @param Media $content
*
* @return Events
*/
public function setContent(Media $content)
{
$this->content = $content;
return $this;
}
/**
* Get content
*
* @return Media
*/
public function getContent()
{
return $this->content;
}
/**
* Set dealer
*
* @param Dealer $dealer
*
* @return Events
*/
public function setDealer(Dealer $dealer)
{
$this->dealer = $dealer;
return $this;
}
/**
* Get dealer
*
* @return Dealer
*/
public function getDealer()
{
return $this->dealer;
}
/**
* @param string $locale
* @return string
*/
public function getName($locale = 'ru')
{
return $locale === 'ru' ? $this->getNameRu() : $this->getNameUa();
}
}