src/PHPDish/Bundle/CoreBundle/EventListener/Notification/PostSubscriber.php
public function onPostCommented(PostCommentedEvent $event)
    {
        if ($event->getPost()->getUser() === $event->getComment()->getUser()) {
            return;
        }

        $notification = $this->notificationHelper->createCommentPostNotification($event->getPost(), $event->getComment());

        $this->notificationHelper->sendNotification($event->getPost()->getUser(), $notification);
    }
public function onPostCommented(PostCommentedEvent $event)
    {
        if ($event->getPost()->getUser() === $event->getComment()->getUser()) {
            return;
        }

        $notification = $this->notificationHelper->createCommentPostNotification($event->getPost(), $event->getComment());

        $this->notificationHelper->sendNotification($event->getPost()->getUser(), $notification);
    }
文章被评论时触发.

@param PostCommentedEvent $event