Newscoop\Services\CommentNotificationService::update PHP Метод

update() публичный Метод

Update
public update ( GenericEvent $event ) : void
$event Newscoop\EventDispatcher\Events\GenericEvent
Результат void
    public function update(GenericEvent $event)
    {
        $comment = $this->commentService->find($event['id']);
        $article = $this->em->getRepository('Newscoop\\Entity\\Article')->getArticle($comment->getThread(), $comment->getLanguage()->getId())->getSingleResult();
        try {
            $user = $this->userService->getCurrentUser();
        } catch (AuthenticationException $e) {
            $user = null;
        }
        $authors = \ArticleAuthor::GetAuthorsByArticle($comment->getThread(), $comment->getLanguage()->getId());
        $this->emailService->sendCommentNotification($comment, $article, $authors, $user);
    }
CommentNotificationService