*/ class AuthorizationEvent extends Event { /** * @var AbstractTask */ protected $task; /** * * @var string */ protected $attribute; /** * * @var TokenInterface */ protected $token; /** * * @var bool */ protected $vote; const VOTE = 'chill_task.vote'; public function __construct( AbstractTask $task, $attribute, TokenInterface $token ) { $this->task = $task; $this->attribute = $attribute; $this->token = $token; } public function getTask(): AbstractTask { return $this->task; } public function getAttribute() { return $this->attribute; } public function getToken(): TokenInterface { return $this->token; } public function getVote() { return $this->vote; } public function setVote($vote) { $this->vote = $vote; return $this; } public function hasVote() { return $this->vote !== NULL; } public function removeVote() { $this->vote = NULL; } }