mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Implemented injection of RequestedEntityService to RequestedRightService
This commit is contained in:
@@ -11,6 +11,7 @@ use App\Domain\RequestManagement\Entity\RequestedEntityInterface;
|
||||
use App\Attribut\RequestedEntityAttribut;
|
||||
use App\Entity\Meta\MetaInterface;
|
||||
use App\Exception\NotCorrectInstanceException;
|
||||
use App\Domain\RequestManagement\Entity\RequestedEntity;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -56,6 +57,16 @@ class RequestedRight implements RequestedRightInterface
|
||||
throw new PreconditionFailedException(get_class($this->requestedEntity).' needs to have a defined attribut id or slug!');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param RequestedEntity|null $requestedEntity
|
||||
*/
|
||||
public function __construct(?RequestedEntity $requestedEntity = null)
|
||||
{
|
||||
if ($requestedEntity) {
|
||||
$this->setRequestedEntity($requestedEntity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses some kind of Lazy loading.
|
||||
*
|
||||
|
Reference in New Issue
Block a user