adding a scope/circle to events

ref #1
This commit is contained in:
2016-03-22 12:36:11 +01:00
parent d7fc04cdaa
commit e66a855c0a
3 changed files with 45 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Chill\EventBundle\Entity\Participation;
use Chill\MainBundle\Entity\Center;
use Chill\EventBundle\Entity\Event;
use Chill\MainBundle\DataFixtures\ORM\LoadScopes;
/**
* Load Events and Participation
@@ -82,6 +83,11 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
->setLabel($this->faker->words(rand(2,4), true))
->setType($this->getReference(LoadEventTypes::$refs[array_rand(LoadEventTypes::$refs)]))
->setCenter($center)
->setCircle(
$this->getReference(
LoadScopes::$references[array_rand(LoadScopes::$references)]
)
)
;
$manager->persist($event);
$events[] = $event;