jobParams = array($commentId, $eventName); return $this; } /** * Execute job * * @param int $commentId * @param string $eventName * @return $this */ public function execute($commentId, $eventName) { $event = CommentEventBuilder::getInstance($this->container) ->withCommentId($commentId) ->build(); if ($event !== null) { $this->dispatcher->dispatch($eventName, $event); if ($eventName === CommentModel::EVENT_CREATE) { $this->userMentionModel->fireEvents($event['comment']['comment'], CommentModel::EVENT_USER_MENTION, $event); } } } }