mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-14 06:14:23 +00:00
parent
d7fc04cdaa
commit
e66a855c0a
@ -8,6 +8,7 @@ use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
|||||||
use Chill\EventBundle\Entity\Participation;
|
use Chill\EventBundle\Entity\Participation;
|
||||||
use Chill\MainBundle\Entity\Center;
|
use Chill\MainBundle\Entity\Center;
|
||||||
use Chill\EventBundle\Entity\Event;
|
use Chill\EventBundle\Entity\Event;
|
||||||
|
use Chill\MainBundle\DataFixtures\ORM\LoadScopes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Events and Participation
|
* Load Events and Participation
|
||||||
@ -82,6 +83,11 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
|
|||||||
->setLabel($this->faker->words(rand(2,4), true))
|
->setLabel($this->faker->words(rand(2,4), true))
|
||||||
->setType($this->getReference(LoadEventTypes::$refs[array_rand(LoadEventTypes::$refs)]))
|
->setType($this->getReference(LoadEventTypes::$refs[array_rand(LoadEventTypes::$refs)]))
|
||||||
->setCenter($center)
|
->setCenter($center)
|
||||||
|
->setCircle(
|
||||||
|
$this->getReference(
|
||||||
|
LoadScopes::$references[array_rand(LoadScopes::$references)]
|
||||||
|
)
|
||||||
|
)
|
||||||
;
|
;
|
||||||
$manager->persist($event);
|
$manager->persist($event);
|
||||||
$events[] = $event;
|
$events[] = $event;
|
||||||
|
@ -34,6 +34,12 @@ class Event
|
|||||||
*/
|
*/
|
||||||
private $type;
|
private $type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @var \Chill\MainBundle\Entity\Scope
|
||||||
|
*/
|
||||||
|
private $circle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Doctrine\Common\Collections\Collection
|
* @var \Doctrine\Common\Collections\Collection
|
||||||
*/
|
*/
|
||||||
@ -141,7 +147,38 @@ class Event
|
|||||||
{
|
{
|
||||||
return $this->center;
|
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
|
* Add participation
|
||||||
*
|
*
|
||||||
|
@ -22,4 +22,6 @@ Chill\EventBundle\Entity\Event:
|
|||||||
targetEntity: Chill\MainBundle\Entity\Center
|
targetEntity: Chill\MainBundle\Entity\Center
|
||||||
type:
|
type:
|
||||||
targetEntity: Chill\EventBundle\Entity\EventType
|
targetEntity: Chill\EventBundle\Entity\EventType
|
||||||
|
circle:
|
||||||
|
targetEntity: Chill\MainBundle\Entity\Scope
|
||||||
lifecycleCallbacks: { }
|
lifecycleCallbacks: { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user