mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
initialize entities
This commit is contained in:
169
Entity/EventType.php
Normal file
169
Entity/EventType.php
Normal file
@@ -0,0 +1,169 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\EventBundle\Entity;
|
||||
|
||||
/**
|
||||
* EventType
|
||||
*/
|
||||
class EventType
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
private $label;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
private $active;
|
||||
|
||||
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set label
|
||||
*
|
||||
* @param array $label
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function setLabel($label)
|
||||
{
|
||||
$this->label = $label;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get label
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLabel()
|
||||
{
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set active
|
||||
*
|
||||
* @param boolean $active
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function setActive($active)
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get active
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getActive()
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $roles;
|
||||
|
||||
/**
|
||||
* @var \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
private $statuses;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->roles = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
$this->statuses = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add role
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Role $role
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function addRole(\Chill\EventBundle\Entity\Role $role)
|
||||
{
|
||||
$this->roles[] = $role;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove role
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Role $role
|
||||
*/
|
||||
public function removeRole(\Chill\EventBundle\Entity\Role $role)
|
||||
{
|
||||
$this->roles->removeElement($role);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get roles
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getRoles()
|
||||
{
|
||||
return $this->roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add status
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Status $status
|
||||
*
|
||||
* @return EventType
|
||||
*/
|
||||
public function addStatus(\Chill\EventBundle\Entity\Status $status)
|
||||
{
|
||||
$this->statuses[] = $status;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove status
|
||||
*
|
||||
* @param \Chill\EventBundle\Entity\Status $status
|
||||
*/
|
||||
public function removeStatus(\Chill\EventBundle\Entity\Status $status)
|
||||
{
|
||||
$this->statuses->removeElement($status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get statuses
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getStatuses()
|
||||
{
|
||||
return $this->statuses;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user