mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Implemented SourceRightManager for SourceFixtures
This commit is contained in:
parent
b39e7c25d4
commit
aea23725f6
@ -13,6 +13,7 @@ use App\Entity\Meta\Right;
|
|||||||
use App\DBAL\Types\LayerType;
|
use App\DBAL\Types\LayerType;
|
||||||
use App\DBAL\Types\RightType;
|
use App\DBAL\Types\RightType;
|
||||||
use App\Entity\Meta\RightInterface;
|
use App\Entity\Meta\RightInterface;
|
||||||
|
use App\Domain\SourceManagement\SourceRightManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
@ -31,6 +32,11 @@ class SourceFixtures extends Fixture
|
|||||||
*/
|
*/
|
||||||
private $guestUserSource;
|
private $guestUserSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*
|
||||||
|
* @see \Doctrine\Common\DataFixtures\FixtureInterface::load()
|
||||||
|
*/
|
||||||
public function load(ObjectManager $manager)
|
public function load(ObjectManager $manager)
|
||||||
{
|
{
|
||||||
$this->setGuestUserSource();
|
$this->setGuestUserSource();
|
||||||
@ -56,8 +62,8 @@ class SourceFixtures extends Fixture
|
|||||||
private function getImpressumRight(): RightInterface
|
private function getImpressumRight(): RightInterface
|
||||||
{
|
{
|
||||||
$right = new Right();
|
$right = new Right();
|
||||||
$right->setSource($this->impressumSource);
|
$sourceRightManager = new SourceRightManager($this->impressumSource);
|
||||||
$right->setLaw($this->impressumSource->getLaw());
|
$sourceRightManager->addRight($right);
|
||||||
$right->setLayer(LayerType::SOURCE);
|
$right->setLayer(LayerType::SOURCE);
|
||||||
$right->setType(RightType::READ);
|
$right->setType(RightType::READ);
|
||||||
$right->setReciever($this->guestUserSource);
|
$right->setReciever($this->guestUserSource);
|
||||||
|
Loading…
Reference in New Issue
Block a user