diff --git a/Security/Authorization/AuthorizationEvent.php b/Security/Authorization/AuthorizationEvent.php index 7cdc25b55..38cda7563 100644 --- a/Security/Authorization/AuthorizationEvent.php +++ b/Security/Authorization/AuthorizationEvent.php @@ -5,7 +5,6 @@ namespace Chill\TaskBundle\Security\Authorization; use Symfony\Component\EventDispatcher\Event; -use Chill\TaskBundle\Entity\AbstractTask; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** @@ -16,9 +15,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; class AuthorizationEvent extends Event { /** - * @var AbstractTask + * @var Chill\TaskBundle\Entity\AbstractTask|\Chill\PersonBundle\Entity\Person|null */ - protected $task; + protected $subject; /** * @@ -41,18 +40,18 @@ class AuthorizationEvent extends Event const VOTE = 'chill_task.vote'; public function __construct( - AbstractTask $task, + $subject, $attribute, TokenInterface $token ) { - $this->task = $task; + $this->subject = $subject; $this->attribute = $attribute; $this->token = $token; } - public function getTask(): AbstractTask + public function getSubject() { - return $this->task; + return $this->subject; } public function getAttribute()