*/ namespace oat\tao\model\actionQueue\event; use oat\oatbox\event\Event; use oat\oatbox\user\User; use oat\tao\model\actionQueue\QueuedAction; /** * Event triggered whenever a new instant action is initialised */ class InstantActionOnQueueEvent implements Event { const EVENT_NAME = __CLASS__; /** * (non-PHPdoc) * @see \oat\oatbox\event\Event::getName() */ public function getName() { return self::EVENT_NAME; } /** * @var string */ private $instantQueueKey = ''; /** * @var User */ private $user; /** * @var array */ private $positions = []; /** * @var QueuedAction */ private $queuedAction = ''; /** * @var string */ private $actionType; /** * InstantActionOnQueueEvent constructor. * @param string $instantQueueKey * @param User $user * @param array $positions * @param string $actionType * @param QueuedAction $action */ public function __construct($instantQueueKey, User $user, $positions, $actionType = '', QueuedAction $action = null) { $this->instantQueueKey = $instantQueueKey; $this->user = $user; $this->positions = $positions; $this->queuedAction = $action; $this->actionType = $actionType; } /** * @return string */ public function getInstantQueueKey() { return $this->instantQueueKey; } /** * @return \oat\oatbox\user\User */ public function getUser() { return $this->user; } /** * @return array */ public function getPositions() { return $this->positions; } /** * @return string */ public function getActionType() { return $this->actionType; } /** * @return QueuedAction */ public function getQueuedAction() { return $this->queuedAction; } }