<?php
namespace Boab\CmsBundle\Entity;
use App\Entity\Participant;
use App\Entity\SeminarInterface;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="events")
* @ORM\Entity(repositoryClass="Boab\CmsBundle\Repository\EventRepository")
*/
class Event extends Content implements EventInterface
{
const EVENTS_UPCOMING = 'events_upcoming';
const EVENTS_PAST = 'events_past';
/**
* @var \DateTime
*
* @ORM\Column(name="event_date", type="datetime", precision=0, scale=0, nullable=true, unique=false)
*/
protected $eventDate;
/**
* @var \DateTime
*
* @ORM\Column(name="end_date", type="datetime", precision=0, scale=0, nullable=true, unique=false)
*/
protected $endDate;
/**
* @var string
*
* @ORM\Column(name="event_time", type="string", length=255, precision=0, scale=0, nullable=true, unique=false)
*/
protected $eventTime;
/**
* @var string
*
* @ORM\Column(name="event_venue", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
*/
protected $eventVenue;
/**
* @var string
*
* @ORM\Column(name="country", type="string", nullable=true, unique=false)
*/
protected $country;
/**
* @var string
*
* @ORM\Column(name="is_register_require", type="boolean", length=1, nullable=true)
*/
private $isRegisterRequire;
/**
* @var string
*
* @ORM\Column(name="price", type="decimal", precision=0, scale=2, nullable=true, unique=false)
*/
protected $price;
public function __construct()
{
parent::__construct();
}
/**
* Set eventVenue
*
* @param string $eventVenue
* @return Event
*/
public function setEventVenue($eventVenue)
{
$this->eventVenue = $eventVenue;
return $this;
}
/**
* Get eventVenue
*
* @return string
*/
public function getEventVenue()
{
return $this->eventVenue;
}
/**
* Set eventDate
*
* @param \DateTime $eventDate
* @return Event
*/
public function setEventDate($eventDate)
{
$this->eventDate = $eventDate;
return $this;
}
/**
* Get eventDate
*
* @return \DateTime
*/
public function getEventDate()
{
return $this->eventDate;
}
/**
* Set eventTime
*
* @param string $eventTime
* @return Event
*/
public function setEventTime($eventTime)
{
$this->eventTime = $eventTime;
return $this;
}
/**
* Get eventTime
*
* @return string
*/
public function getEventTime()
{
return $this->eventTime;
}
/**
* Set isRegisterRequire
*
* @param boolean $isRegisterRequire
* @return Event
*/
public function setIsRegisterRequire($isRegisterRequire)
{
$this->isRegisterRequire = $isRegisterRequire;
return $this;
}
/**
* Get isRegisterRequire
*
* @return boolean
*/
public function getIsRegisterRequire()
{
return $this->isRegisterRequire;
}
/**
* Set price
*
* @param string $price
* @return ListingItem
*/
public function setPrice($price)
{
$this->price = str_replace(',','',$price);
return $this;
}
/**
* Get price
*
* @return string
*/
public function getPrice()
{
return $this->price;
}
public function isRegisterRequire()
{
return (bool)$this->getIsRegisterRequire();
}
public function getDateExploded()
{
return explode('-',$this->getEventDate('d-M-Y'));
}
public function getEventMonthYear()
{
return $this->eventDate->format('F Y');
}
/**
* Set endDate.
*
* @param \DateTime|null $endDate
*
* @return Event
*/
public function setEndDate($endDate = null)
{
$this->endDate = $endDate;
return $this;
}
/**
* Get endDate.
*
* @return \DateTime|null
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* Get the value of country
*
* @return string
*/
public function getCountry()
{
return $this->country;
}
/**
* Set the value of country
*
* @param string $country
*
* @return self
*/
public function setCountry(string $country)
{
$this->country = $country;
return $this;
}
}