chill-bundles/Entity/EventType.php
Julien Fastré d8de53ca3c rename 'label' to 'name'.
Warning : this commit require to rename some table column, but the
original Version file has been update.

If you do not care to loose your date, you may run :

```
php app/console doctrine:migrations:execute --down 20160318111334
php app/console doctrine:migrations:execute --up 20160318111334
php app/console doctrine:cache:metadata #(if you have a cache for
doctrine meta date)
```
close #20
2016-03-24 23:30:37 +01:00

170 lines
2.7 KiB
PHP

<?php
namespace Chill\EventBundle\Entity;
/**
* EventType
*/
class EventType
{
/**
* @var integer
*/
private $id;
/**
* @var array
*/
private $name;
/**
* @var boolean
*/
private $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();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set label
*
* @param array $label
*
* @return EventType
*/
public function setName($label)
{
$this->name = $label;
return $this;
}
/**
* Get label
*
* @return array
*/
public function getName()
{
return $this->name;
}
/**
* 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;
}
/**
* 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;
}
}