<?phpnamespace DcSiteBundle\Entity;use Application\Sonata\MediaBundle\Entity\Media;use CoreBundle\Entity\Dealer;use DateTime;/** * SalesContract */class SalesContract{    /**     * @var integer     */    private $id;    /**     * @var string     */    private $title_ua;    /**     * @var string     */    private $title_ru;    /**     * @var DateTime     */    private $begin_date;    /**     * @var Media     */    private $file;    /**     * @var Dealer     */    private $dealer;    /**     * Get id     *     * @return integer     */    public function getId()    {        return $this->id;    }    /**     * Set titleUa     *     * @param string $titleUa     *     * @return SalesContract     */    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 SalesContract     */    public function setTitleRu($titleRu)    {        $this->title_ru = $titleRu;        return $this;    }    /**     * Get titleRu     *     * @return string     */    public function getTitleRu()    {        return $this->title_ru;    }    /**     * Set beginDate     *     * @param DateTime $beginDate     *     * @return SalesContract     */    public function setBeginDate($beginDate)    {        $this->begin_date = $beginDate;        return $this;    }    /**     * Get beginDate     *     * @return DateTime     */    public function getBeginDate()    {        return $this->begin_date;    }    /**     * Set file     *     * @param Media $file     *     * @return SalesContract     */    public function setFile(Media $file = null)    {        $this->file = $file;        return $this;    }    /**     * Get file     *     * @return Media     */    public function getFile()    {        return $this->file;    }    /**     * Set dealer     *     * @param Dealer $dealer     *     * @return SalesContract     */    public function setDealer(Dealer $dealer = null)    {        $this->dealer = $dealer;        return $this;    }    /**     * Get dealer     *     * @return Dealer     */    public function getDealer()    {        return $this->dealer;    }    public function getTitle($lang)    {        return $lang == 'ua' ? $this->getTitleUa() : $this->getTitleRu();    }    /**     * @var integer     */    private $type;    /**     * Set type     *     * @param integer $type     *     * @return SalesContract     */    public function setType($type)    {        $this->type = $type;        return $this;    }    /**     * Get type     *     * @return integer     */    public function getType()    {        return $this->type;    }}