src/PHPDish/Bundle/CoreBundle/EventListener/Notification/UserSubscriber.php
public function onUserFollowed(UserFollowedEvent $event)
    {
        if ($event->getUser() === $event->getFollower()) {
            return;
        }
        $notification = $this->notificationHelper->createFollowUserNotification($event->getFollower());
        $this->notificationHelper->sendNotification($event->getUser(), $notification);
    }
public function onUserFollowed(UserFollowedEvent $event)
    {
        if ($event->getUser() === $event->getFollower()) {
            return;
        }
        $notification = $this->notificationHelper->createFollowUserNotification($event->getFollower());
        $this->notificationHelper->sendNotification($event->getUser(), $notification);
    }
用户被关注时，生成通知.

@param UserFollowedEvent $event