From aea23725f6d382283c71fb41538c85366f8172c0 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Thu, 3 Jan 2019 21:04:48 +0100 Subject: [PATCH] Implemented SourceRightManager for SourceFixtures --- application/src/DataFixtures/SourceFixtures.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/src/DataFixtures/SourceFixtures.php b/application/src/DataFixtures/SourceFixtures.php index 65bb309..67406df 100644 --- a/application/src/DataFixtures/SourceFixtures.php +++ b/application/src/DataFixtures/SourceFixtures.php @@ -13,6 +13,7 @@ use App\Entity\Meta\Right; use App\DBAL\Types\LayerType; use App\DBAL\Types\RightType; use App\Entity\Meta\RightInterface; +use App\Domain\SourceManagement\SourceRightManager; /** * @author kevinfrantz @@ -31,6 +32,11 @@ class SourceFixtures extends Fixture */ private $guestUserSource; + /** + * {@inheritdoc} + * + * @see \Doctrine\Common\DataFixtures\FixtureInterface::load() + */ public function load(ObjectManager $manager) { $this->setGuestUserSource(); @@ -56,8 +62,8 @@ class SourceFixtures extends Fixture private function getImpressumRight(): RightInterface { $right = new Right(); - $right->setSource($this->impressumSource); - $right->setLaw($this->impressumSource->getLaw()); + $sourceRightManager = new SourceRightManager($this->impressumSource); + $sourceRightManager->addRight($right); $right->setLayer(LayerType::SOURCE); $right->setType(RightType::READ); $right->setReciever($this->guestUserSource);