/**
* Dispatch event
*
* @param Newscoop\Entity\User $user
* @param Newscoop\NewscoopBundle\Entity\Topic $topic
*/
private function notify(User $user, Topic $topic)
{
if (empty($this->dispatcher)) {
return;
}
$this->dispatcher->dispatch('topic.follow', new \Newscoop\EventDispatcher\Events\GenericEvent($this, array('topic_name' => $topic->getName(), 'topic_id' => $topic->getTopicId(), 'user' => $user)));
}