sf4 deprecated: migrate Doctrine ORM mapping to annotation

This commit is contained in:
Tchama 2020-07-24 18:57:58 +02:00
parent c8c76e5a8d
commit ad8c1bbe9f
10 changed files with 291 additions and 212 deletions

View File

@ -1,67 +1,111 @@
<?php <?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\EventBundle\Entity; namespace Chill\EventBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Scope;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use Chill\MainBundle\Entity\HasCenterInterface; use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface; use Chill\MainBundle\Entity\HasScopeInterface;
/** /**
* Event * Class Event
*
* @package Chill\EventBundle\Entity
* @ORM\Entity(repositoryClass="Chill\EventBundle\Repository\EventRepository")
* @ORM\Table(name="chill_event_event")
* @ORM\HasLifecycleCallbacks()
*/ */
class Event implements HasCenterInterface, HasScopeInterface class Event implements HasCenterInterface, HasScopeInterface
{ {
/** /**
* @var integer * @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var string * @var string
* @ORM\Column(type="string", length=150)
*/ */
private $name; private $name;
/** /**
* @var \DateTime * @var \DateTime
* @ORM\Column(type="datetime")
*/ */
private $date; private $date;
/** /**
* *
* @var \Chill\MainBundle\Entity\Center * @var Center
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Center")
*/ */
private $center; private $center;
/** /**
* *
* @var EventType * @var EventType
* @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\EventType")
*/ */
private $type; private $type;
/** /**
* *
* @var \Chill\MainBundle\Entity\Scope * @var Scope
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*/ */
private $circle; private $circle;
/** /**
* @var \Doctrine\Common\Collections\Collection * @var Participation
* @ORM\OneToMany(
* targetEntity="Chill\EventBundle\Entity\Participation",
* mappedBy="event")
*/ */
private $participations; private $participations;
/** /**
* @var integer *
* @var User
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/ */
private $moderator; private $moderator;
/** /**
* Constructor * Event constructor.
*/ */
public function __construct() public function __construct()
{ {
$this->participations = new \Doctrine\Common\Collections\ArrayCollection(); $this->participations = new ArrayCollection();
} }
/** /**
* Get id * Get id
* *
@ -76,7 +120,6 @@ class Event implements HasCenterInterface, HasScopeInterface
* Set label * Set label
* *
* @param string $label * @param string $label
*
* @return Event * @return Event
*/ */
public function setName($label) public function setName($label)
@ -100,7 +143,6 @@ class Event implements HasCenterInterface, HasScopeInterface
* Set date * Set date
* *
* @param \DateTime $date * @param \DateTime $date
*
* @return Event * @return Event
*/ */
public function setDate(\DateTime $date) public function setDate(\DateTime $date)
@ -120,7 +162,11 @@ class Event implements HasCenterInterface, HasScopeInterface
return $this->date; return $this->date;
} }
public function setCenter(\Chill\MainBundle\Entity\Center $center) /**
* @param Center $center
* @return $this
*/
public function setCenter(Center $center)
{ {
$this->center = $center; $this->center = $center;
@ -128,7 +174,6 @@ class Event implements HasCenterInterface, HasScopeInterface
} }
/** /**
*
* @return EventType * @return EventType
*/ */
public function getType() public function getType()
@ -137,9 +182,8 @@ class Event implements HasCenterInterface, HasScopeInterface
} }
/** /**
* * @param EventType $type
* @param \Chill\EventBundle\Entity\EventType $type * @return $this
* @return \Chill\EventBundle\Entity\Event
*/ */
public function setType(EventType $type) public function setType(EventType $type)
{ {
@ -148,8 +192,7 @@ class Event implements HasCenterInterface, HasScopeInterface
} }
/** /**
* * @return Center
* @return \Chill\MainBundle\Entity\Center
*/ */
public function getCenter() public function getCenter()
{ {
@ -157,8 +200,7 @@ class Event implements HasCenterInterface, HasScopeInterface
} }
/** /**
* * @return Scope
* @return \Chill\MainBundle\Entity\Scope
*/ */
public function getCircle() public function getCircle()
{ {
@ -166,9 +208,8 @@ class Event implements HasCenterInterface, HasScopeInterface
} }
/** /**
* * @param Scope $circle
* @param \Chill\MainBundle\Entity\Scope $circle * @return $this
* @return \Chill\EventBundle\Entity\Event
*/ */
public function setCircle(\Chill\MainBundle\Entity\Scope $circle) public function setCircle(\Chill\MainBundle\Entity\Scope $circle)
{ {
@ -177,9 +218,8 @@ class Event implements HasCenterInterface, HasScopeInterface
} }
/** /**
*
* @deprecated * @deprecated
* @return \Chill\MainBundle\Entity\Scope * @return Scope
*/ */
public function getScope() public function getScope()
{ {
@ -190,11 +230,10 @@ class Event implements HasCenterInterface, HasScopeInterface
/** /**
* Add participation * Add participation
* *
* @param \Chill\EventBundle\Entity\Participation $participation * @param Participation $participation
*
* @return Event * @return Event
*/ */
public function addParticipation(\Chill\EventBundle\Entity\Participation $participation) public function addParticipation(Participation $participation)
{ {
$this->participations[] = $participation; $this->participations[] = $participation;
@ -204,17 +243,15 @@ class Event implements HasCenterInterface, HasScopeInterface
/** /**
* Remove participation * Remove participation
* *
* @param \Chill\EventBundle\Entity\Participation $participation * @param Participation $participation
*/ */
public function removeParticipation(\Chill\EventBundle\Entity\Participation $participation) public function removeParticipation(Participation $participation)
{ {
$this->participations->removeElement($participation); $this->participations->removeElement($participation);
} }
/** /**
* Get participations * @return \ArrayIterator|\Traversable|Collection
*
* @return \ArrayIterator|\Doctrine\Common\Collections\Collection|\Traversable
*/ */
public function getParticipations() public function getParticipations()
{ {

View File

@ -1,34 +1,74 @@
<?php <?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\EventBundle\Entity; namespace Chill\EventBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
/** /**
* EventType * Class EventType
*
* @package Chill\EventBundle\Entity
* @ORM\Entity()
* @ORM\Table(name="chill_event_event_type")
* @ORM\HasLifecycleCallbacks()
*/ */
class EventType class EventType
{ {
/** /**
* @var integer * @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var array * @var array
* @ORM\Column(type="json_array")
*/ */
private $name; private $name;
/** /**
* @var boolean * @var boolean
* @ORM\Column(type="boolean")
*/ */
private $active; private $active;
/** /**
* @var \Doctrine\Common\Collections\Collection * @var Collection
* @ORM\OneToMany(
* targetEntity="Chill\EventBundle\Entity\Role",
* mappedBy="type")
*/ */
private $roles; private $roles;
/** /**
* @var \Doctrine\Common\Collections\Collection * @var Collection
* @ORM\OneToMany(
* targetEntity="Chill\EventBundle\Entity\Status",
* mappedBy="type")
*/ */
private $statuses; private $statuses;
@ -37,8 +77,8 @@ class EventType
*/ */
public function __construct() public function __construct()
{ {
$this->roles = new \Doctrine\Common\Collections\ArrayCollection(); $this->roles = new ArrayCollection();
$this->statuses = new \Doctrine\Common\Collections\ArrayCollection(); $this->statuses = new ArrayCollection();
} }
/** /**
@ -55,7 +95,6 @@ class EventType
* Set label * Set label
* *
* @param array $label * @param array $label
*
* @return EventType * @return EventType
*/ */
public function setName($label) public function setName($label)
@ -79,7 +118,6 @@ class EventType
* Set active * Set active
* *
* @param boolean $active * @param boolean $active
*
* @return EventType * @return EventType
*/ */
public function setActive($active) public function setActive($active)
@ -102,11 +140,10 @@ class EventType
/** /**
* Add role * Add role
* *
* @param \Chill\EventBundle\Entity\Role $role * @param Role $role
*
* @return EventType * @return EventType
*/ */
public function addRole(\Chill\EventBundle\Entity\Role $role) public function addRole(Role $role)
{ {
$this->roles[] = $role; $this->roles[] = $role;
@ -116,9 +153,9 @@ class EventType
/** /**
* Remove role * Remove role
* *
* @param \Chill\EventBundle\Entity\Role $role * @param Role $role
*/ */
public function removeRole(\Chill\EventBundle\Entity\Role $role) public function removeRole(Role $role)
{ {
$this->roles->removeElement($role); $this->roles->removeElement($role);
} }
@ -126,7 +163,7 @@ class EventType
/** /**
* Get roles * Get roles
* *
* @return \Doctrine\Common\Collections\Collection * @return Collection
*/ */
public function getRoles() public function getRoles()
{ {
@ -136,11 +173,10 @@ class EventType
/** /**
* Add status * Add status
* *
* @param \Chill\EventBundle\Entity\Status $status * @param Status $status
*
* @return EventType * @return EventType
*/ */
public function addStatus(\Chill\EventBundle\Entity\Status $status) public function addStatus(Status $status)
{ {
$this->statuses[] = $status; $this->statuses[] = $status;
@ -150,9 +186,9 @@ class EventType
/** /**
* Remove status * Remove status
* *
* @param \Chill\EventBundle\Entity\Status $status * @param Status $status
*/ */
public function removeStatus(\Chill\EventBundle\Entity\Status $status) public function removeStatus(Status $status)
{ {
$this->statuses->removeElement($status); $this->statuses->removeElement($status);
} }
@ -160,7 +196,7 @@ class EventType
/** /**
* Get statuses * Get statuses
* *
* @return \Doctrine\Common\Collections\Collection * @return Collection
*/ */
public function getStatuses() public function getStatuses()
{ {

View File

@ -1,43 +1,83 @@
<?php <?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\EventBundle\Entity; namespace Chill\EventBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\Scope;
use Chill\PersonBundle\Entity\Person;
use Chill\MainBundle\Entity\HasScopeInterface; use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\HasCenterInterface; use Chill\MainBundle\Entity\HasCenterInterface;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
/** /**
* Participation * Class Participation
*
* @package Chill\EventBundle\Entity
* @ORM\Entity(
* repositoryClass="Chill\EventBundle\Repository\ParticipationRepository")
* @ORM\Table(name="chill_event_participation")
* @ORM\HasLifecycleCallbacks()
*/ */
class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAccess class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAccess
{ {
/** /**
* @var integer * @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var \DateTime * @var \DateTime
* @ORM\Column(type="datetime")
*/ */
private $lastUpdate; private $lastUpdate;
/** /**
* @var \Chill\EventBundle\Entity\Event * @var Event
* @ORM\ManyToOne(
* targetEntity="Chill\EventBundle\Entity\Event",
* inversedBy="participations")
*/ */
private $event; private $event;
/** /**
* @var \Chill\PersonBundle\Entity\Person * @var Person
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/ */
private $person; private $person;
/** /**
* @var \Chill\EventBundle\Entity\Role * @var Role
* @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Role")
*/ */
private $role; private $role;
/** /**
* @var \Chill\EventBundle\Entity\Status * @var Status
* @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Status")
*/ */
private $status; private $status;
@ -56,7 +96,6 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
* Set lastUpdate * Set lastUpdate
* *
* @param \DateTime $lastUpdate * @param \DateTime $lastUpdate
*
* @return Participation * @return Participation
*/ */
protected function update() protected function update()
@ -80,11 +119,10 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Set event * Set event
* *
* @param \Chill\EventBundle\Entity\Event $event * @param Event $event
*
* @return Participation * @return Participation
*/ */
public function setEvent(\Chill\EventBundle\Entity\Event $event = null) public function setEvent(Event $event = null)
{ {
if ($this->event !== $event) { if ($this->event !== $event) {
$this->update(); $this->update();
@ -98,7 +136,7 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Get event * Get event
* *
* @return \Chill\EventBundle\Entity\Event * @return Event
*/ */
public function getEvent() public function getEvent()
{ {
@ -108,11 +146,10 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Set person * Set person
* *
* @param \Chill\PersonBundle\Entity\Person $person * @param Person $person
*
* @return Participation * @return Participation
*/ */
public function setPerson(\Chill\PersonBundle\Entity\Person $person = null) public function setPerson(Person $person = null)
{ {
if ($person !== $this->person) { if ($person !== $this->person) {
$this->update(); $this->update();
@ -126,7 +163,7 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Get person * Get person
* *
* @return \Chill\PersonBundle\Entity\Person * @return Person
*/ */
public function getPerson() public function getPerson()
{ {
@ -136,11 +173,10 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Set role * Set role
* *
* @param \Chill\EventBundle\Entity\Role $role * @param Role $role
*
* @return Participation * @return Participation
*/ */
public function setRole(\Chill\EventBundle\Entity\Role $role = null) public function setRole(Role $role = null)
{ {
if ($role !== $this->role) { if ($role !== $this->role) {
$this->update(); $this->update();
@ -153,7 +189,7 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Get role * Get role
* *
* @return \Chill\EventBundle\Entity\Role * @return Role
*/ */
public function getRole() public function getRole()
{ {
@ -163,11 +199,10 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Set status * Set status
* *
* @param \Chill\EventBundle\Entity\Status $status * @param Status $status
*
* @return Participation * @return Participation
*/ */
public function setStatus(\Chill\EventBundle\Entity\Status $status = null) public function setStatus(Status $status = null)
{ {
if ($this->status !== $status) { if ($this->status !== $status) {
$this->update(); $this->update();
@ -181,13 +216,16 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
/** /**
* Get status * Get status
* *
* @return \Chill\EventBundle\Entity\Status * @return Status
*/ */
public function getStatus() public function getStatus()
{ {
return $this->status; return $this->status;
} }
/**
* @return Center
*/
public function getCenter() public function getCenter()
{ {
if ($this->getEvent() === NULL) { if ($this->getEvent() === NULL) {
@ -197,7 +235,10 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
return $this->getEvent()->getCenter(); return $this->getEvent()->getCenter();
} }
/**
* @return Scope
*/
public function getScope() public function getScope()
{ {
if ($this->getEvent() === NULL) { if ($this->getEvent() === NULL) {
@ -237,14 +278,22 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
->addViolation(); ->addViolation();
} }
} }
/**
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset) public function offsetExists($offset)
{ {
return in_array($offset, array( return in_array($offset, array(
'person', 'role', 'status', 'event' 'person', 'role', 'status', 'event'
)); ));
} }
/**
* @param mixed $offset
* @return Event|Role|Status|Person|mixed
*/
public function offsetGet($offset) public function offsetGet($offset)
{ {
switch ($offset) { switch ($offset) {
@ -262,7 +311,12 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
break; break;
} }
} }
/**
* @param mixed $offset
* @param mixed $value
* @return Participation|void
*/
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
{ {
switch($offset) { switch($offset) {
@ -280,7 +334,10 @@ class Participation implements HasCenterInterface, HasScopeInterface, \ArrayAcce
break; break;
} }
} }
/**
* @param mixed $offset
*/
public function offsetUnset($offset) public function offsetUnset($offset)
{ {
$this->offsetSet($offset, null); $this->offsetSet($offset, null);

View File

@ -1,29 +1,64 @@
<?php <?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\EventBundle\Entity; namespace Chill\EventBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/** /**
* Role * Class Role
*
* @package Chill\EventBundle\Entity
* @ORM\Entity()
* @ORM\Table(name="chill_event_role")
* @ORM\HasLifecycleCallbacks()
*/ */
class Role class Role
{ {
/** /**
* @var integer * @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var array * @var array
* @ORM\Column(type="json_array")
*/ */
private $name; private $name;
/** /**
* @var boolean * @var boolean
* @ORM\Column(type="boolean")
*/ */
private $active; private $active;
/** /**
* @var \Chill\EventBundle\Entity\EventType * @var EventType
* @ORM\ManyToOne(
* targetEntity="Chill\EventBundle\Entity\EventType",
* inversedBy="roles")
*/ */
private $type; private $type;
@ -42,7 +77,6 @@ class Role
* Set label * Set label
* *
* @param array $label * @param array $label
*
* @return Role * @return Role
*/ */
public function setName($label) public function setName($label)
@ -66,7 +100,6 @@ class Role
* Set active * Set active
* *
* @param boolean $active * @param boolean $active
*
* @return Role * @return Role
*/ */
public function setActive($active) public function setActive($active)
@ -90,8 +123,7 @@ class Role
/** /**
* Set type * Set type
* *
* @param \Chill\EventBundle\Entity\EventType $type * @param EventType $type
*
* @return Role * @return Role
*/ */
public function setType(EventType $type = null) public function setType(EventType $type = null)
@ -104,7 +136,7 @@ class Role
/** /**
* Get type * Get type
* *
* @return \Chill\EventBundle\Entity\EventType * @return EventType
*/ */
public function getType() public function getType()
{ {

View File

@ -1,29 +1,64 @@
<?php <?php
/*
* Chill is a software for social workers
*
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Chill\EventBundle\Entity; namespace Chill\EventBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/** /**
* Status * Class Status
*
* @package Chill\EventBundle\Entity
* @ORM\Entity()
* @ORM\Table(name="chill_event_status")
* @ORM\HasLifecycleCallbacks()
*/ */
class Status class Status
{ {
/** /**
* @var integer * @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/ */
private $id; private $id;
/** /**
* @var array * @var array
* @ORM\Column(type="json_array")
*/ */
private $name; private $name;
/** /**
* @var boolean * @var boolean
* @ORM\Column(type="boolean")
*/ */
private $active; private $active;
/** /**
* @var \Chill\EventBundle\Entity\EventType * @var EventType
* @ORM\ManyToOne(
* targetEntity="Chill\EventBundle\Entity\EventType",
* inversedBy="statuses")
*/ */
private $type; private $type;
@ -42,7 +77,6 @@ class Status
* Set label * Set label
* *
* @param array $name * @param array $name
*
* @return Status * @return Status
*/ */
public function setName($name) public function setName($name)
@ -67,7 +101,6 @@ class Status
* Set active * Set active
* *
* @param boolean $active * @param boolean $active
*
* @return Status * @return Status
*/ */
public function setActive($active) public function setActive($active)
@ -91,11 +124,10 @@ class Status
/** /**
* Set type * Set type
* *
* @param \Chill\EventBundle\Entity\EventType $type * @param EventType $type
*
* @return Status * @return Status
*/ */
public function setType(\Chill\EventBundle\Entity\EventType $type = null) public function setType(EventType $type = null)
{ {
$this->type = $type; $this->type = $type;
@ -105,7 +137,7 @@ class Status
/** /**
* Get type * Get type
* *
* @return \Chill\EventBundle\Entity\EventType * @return EventType
*/ */
public function getType() public function getType()
{ {

View File

@ -1,31 +0,0 @@
Chill\EventBundle\Entity\Event:
type: entity
table: chill_event_event
repositoryClass: Chill\EventBundle\Repository\EventRepository
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
name:
type: string
length: '150'
date:
type: datetime
oneToMany:
participations:
targetEntity: Chill\EventBundle\Entity\Participation
mappedBy: event
manyToOne:
center:
targetEntity: Chill\MainBundle\Entity\Center
type:
targetEntity: Chill\EventBundle\Entity\EventType
circle:
targetEntity: Chill\MainBundle\Entity\Scope
moderator:
targetEntity: Chill\MainBundle\Entity\User
lifecycleCallbacks: { }

View File

@ -1,22 +0,0 @@
Chill\EventBundle\Entity\EventType:
type: entity
table: chill_event_event_type
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
name:
type: json_array
active:
type: boolean
oneToMany:
roles:
targetEntity: Chill\EventBundle\Entity\Role
mappedBy: type
statuses:
targetEntity: Chill\EventBundle\Entity\Status
mappedBy: type
lifecycleCallbacks: { }

View File

@ -1,24 +0,0 @@
Chill\EventBundle\Entity\Participation:
type: entity
table: chill_event_participation
repositoryClass: Chill\EventBundle\Repository\ParticipationRepository
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
lastUpdate:
type: datetime
manyToOne:
event:
targetEntity: Chill\EventBundle\Entity\Event
inversedBy: participations
person:
targetEntity: Chill\PersonBundle\Entity\Person
role:
targetEntity: Chill\EventBundle\Entity\Role
status:
targetEntity: Chill\EventBundle\Entity\Status
lifecycleCallbacks: { }

View File

@ -1,19 +0,0 @@
Chill\EventBundle\Entity\Role:
type: entity
table: chill_event_role
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
name:
type: json_array
active:
type: boolean
manyToOne:
type:
targetEntity: Chill\EventBundle\Entity\EventType
inversedBy: roles
lifecycleCallbacks: { }

View File

@ -1,19 +0,0 @@
Chill\EventBundle\Entity\Status:
type: entity
table: chill_event_status
id:
id:
type: integer
id: true
generator:
strategy: AUTO
fields:
name:
type: json_array
active:
type: boolean
manyToOne:
type:
targetEntity: Chill\EventBundle\Entity\EventType
inversedBy: statuses
lifecycleCallbacks: { }