mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 12:33:49 +00:00
Pass class as second parameter to getReference() fixture method
This commit is contained in:
@@ -13,7 +13,9 @@ namespace Chill\TaskBundle\DataFixtures\ORM;
|
||||
|
||||
use Chill\MainBundle\DataFixtures\ORM\LoadPermissionsGroup;
|
||||
use Chill\MainBundle\DataFixtures\ORM\LoadScopes;
|
||||
use Chill\MainBundle\Entity\PermissionsGroup;
|
||||
use Chill\MainBundle\Entity\RoleScope;
|
||||
use Chill\MainBundle\Entity\Scope;
|
||||
use Chill\TaskBundle\Security\Authorization\TaskVoter;
|
||||
use Doctrine\Common\DataFixtures\AbstractFixture;
|
||||
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
|
||||
@@ -33,10 +35,10 @@ class LoadTaskACL extends AbstractFixture implements OrderedFixtureInterface
|
||||
public function load(ObjectManager $manager): void
|
||||
{
|
||||
foreach (LoadPermissionsGroup::$refs as $permissionsGroupRef) {
|
||||
$permissionsGroup = $this->getReference($permissionsGroupRef, null);
|
||||
$permissionsGroup = $this->getReference($permissionsGroupRef, PermissionsGroup::class);
|
||||
|
||||
foreach (LoadScopes::$references as $scopeRef) {
|
||||
$scope = $this->getReference($scopeRef, null);
|
||||
$scope = $this->getReference($scopeRef, Scope::class);
|
||||
// create permission group
|
||||
switch ($permissionsGroup->getName()) {
|
||||
case 'social':
|
||||
|
Reference in New Issue
Block a user