mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
Add second parameter to add-, get-, hasReference() methods in fixture classes
This commit is contained in:
@@ -44,11 +44,12 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa
|
||||
$event = (new Event())
|
||||
->setDate($this->faker->dateTimeBetween('-2 years', '+6 months'))
|
||||
->setName($this->faker->words(random_int(2, 4), true))
|
||||
->setType($this->getReference(LoadEventTypes::$refs[array_rand(LoadEventTypes::$refs)]))
|
||||
->setType($this->getReference(LoadEventTypes::$refs[array_rand(LoadEventTypes::$refs)], null))
|
||||
->setCenter($center)
|
||||
->setCircle(
|
||||
$this->getReference(
|
||||
LoadScopes::$references[array_rand(LoadScopes::$references)]
|
||||
LoadScopes::$references[array_rand(LoadScopes::$references)],
|
||||
null
|
||||
)
|
||||
);
|
||||
$manager->persist($event);
|
||||
|
@@ -31,10 +31,10 @@ class LoadRolesACL extends AbstractFixture implements OrderedFixtureInterface
|
||||
public function load(ObjectManager $manager): void
|
||||
{
|
||||
foreach (LoadPermissionsGroup::$refs as $permissionsGroupRef) {
|
||||
$permissionsGroup = $this->getReference($permissionsGroupRef);
|
||||
$permissionsGroup = $this->getReference($permissionsGroupRef, null);
|
||||
|
||||
foreach (LoadScopes::$references as $scopeRef) {
|
||||
$scope = $this->getReference($scopeRef);
|
||||
$scope = $this->getReference($scopeRef, null);
|
||||
// create permission group
|
||||
switch ($permissionsGroup->getName()) {
|
||||
case 'social':
|
||||
|
Reference in New Issue
Block a user