chill-bundles/Entity/Event.php
2016-03-22 21:19:16 +01:00

219 lines
3.7 KiB
PHP

<?php
namespace Chill\EventBundle\Entity;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\HasCenterInterface;
/**
* Event
*/
class Event implements HasScopeInterface, HasCenterInterface
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $label;
/**
* @var \DateTime
*/
private $date;
/**
*
* @var \Chill\MainBundle\Entity\Center
*/
private $center;
/**
*
* @var EventType
*/
private $type;
/**
*
* @var \Chill\MainBundle\Entity\Scope
*/
private $circle;
/**
* @var \Doctrine\Common\Collections\Collection
*/
private $participations;
/**
* Constructor
*/
public function __construct()
{
$this->participations = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param string $label
*
* @return Event
*/
public function setLabel($label)
{
$this->label = $label;
return $this;
}
/**
* Get label
*
* @return string
*/
public function getLabel()
{
return $this->label;
}
/**
* Set date
*
* @param \DateTime $date
*
* @return Event
*/
public function setDate(\DateTime $date)
{
$this->date = $date;
return $this;
}
/**
* Get date
*
* @return \DateTime
*/
public function getDate()
{
return $this->date;
}
public function setCenter(\Chill\MainBundle\Entity\Center $center)
{
$this->center = $center;
return $this;
}
/**
*
* @return EventType
*/
public function getType()
{
return $this->type;
}
/**
*
* @param \Chill\EventBundle\Entity\EventType $type
* @return \Chill\EventBundle\Entity\Event
*/
public function setType(EventType $type)
{
$this->type = $type;
return $this;
}
/**
*
* @return \Chill\MainBundle\Entity\Center
*/
public function getCenter()
{
return $this->center;
}
/**
*
* @return \Chill\MainBundle\Entity\Scope
*/
public function getCircle()
{
return $this->circle;
}
/**
*
* @param \Chill\MainBundle\Entity\Scope $circle
* @return \Chill\EventBundle\Entity\Event
*/
public function setCircle(\Chill\MainBundle\Entity\Scope $circle)
{
$this->circle = $circle;
return $this;
}
/**
*
* @deprecated
* @return \Chill\MainBundle\Entity\Scope
*/
public function getScope()
{
return $this->getCircle();
}
/**
* Add participation
*
* @param \Chill\EventBundle\Entity\Participation $participation
*
* @return Event
*/
public function addParticipation(\Chill\EventBundle\Entity\Participation $participation)
{
$this->participations[] = $participation;
return $this;
}
/**
* Remove participation
*
* @param \Chill\EventBundle\Entity\Participation $participation
*/
public function removeParticipation(\Chill\EventBundle\Entity\Participation $participation)
{
$this->participations->removeElement($participation);
}
/**
* Get participations
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getParticipations()
{
return $this->participations;
}
}