mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
131 lines
2.1 KiB
PHP
131 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace Chill\EventBundle\Entity;
|
|
|
|
/**
|
|
* Event
|
|
*/
|
|
class Event
|
|
{
|
|
/**
|
|
* @var integer
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $label;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*/
|
|
private $date;
|
|
|
|
/**
|
|
* @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($date)
|
|
{
|
|
$this->date = $date;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get date
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getDate()
|
|
{
|
|
return $this->date;
|
|
}
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
}
|