src/PHPDish/Bundle/CoreBundle/EventListener/Notification/TopicSubscriber.php
public function onTopicVoted(VoteTopicEvent $event)
    {
        //自己点赞自己不用通知
        if ($event->getTopic()->getUser() === $event->getVoter()) {
            return;
        }
        $notification = $this->notificationHelper->createVoteTopicNotification($event->getTopic(), $event->getVoter());

        $this->notificationHelper->sendNotification($event->getTopic()->getUser(), $notification);
    }
public function onTopicVoted(VoteTopicEvent $event)
    {
        //自己点赞自己不用通知
        if ($event->getTopic()->getUser() === $event->getVoter()) {
            return;
        }
        $notification = $this->notificationHelper->createVoteTopicNotification($event->getTopic(), $event->getVoter());

        $this->notificationHelper->sendNotification($event->getTopic()->getUser(), $notification);
    }
话题被点赞时触发.

@param VoteTopicEvent $event