2019-01-26 16:42:13 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Attribut;
|
|
|
|
|
|
|
|
use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author kevinfrantz
|
|
|
|
*
|
|
|
|
* @see RequestedRightAttributInterface
|
|
|
|
*/
|
|
|
|
trait RequestedRightAttribut
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var RequestedRightInterface
|
|
|
|
*/
|
|
|
|
protected $requestedRight;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param RequestedRightInterface $requestedRight
|
|
|
|
*/
|
|
|
|
public function setRequestedRight(RequestedRightInterface $requestedRight): void
|
|
|
|
{
|
|
|
|
$this->requestedRight = $requestedRight;
|
|
|
|
}
|
|
|
|
|
2019-01-26 19:39:36 +01:00
|
|
|
/**
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function hasRequestedRight(): bool
|
|
|
|
{
|
|
|
|
return isset($this->requestedRight);
|
|
|
|
}
|
|
|
|
|
2019-01-26 16:42:13 +01:00
|
|
|
/**
|
|
|
|
* @return RequestedRightInterface
|
|
|
|
*/
|
|
|
|
public function getRequestedRight(): RequestedRightInterface
|
|
|
|
{
|
|
|
|
return $this->requestedRight;
|
|
|
|
}
|
|
|
|
}
|