original_string: public function subscribe(Forum $forum, User $user, $selfActivation = true)
      {
          $this->om->startFlushSuite();
          $notification = new Notification();
          $notification->setUser($user);
          $notification->setForum($forum);
          $notification->setSelfActivation($selfActivation);
          $this->om->persist($notification);
          $this->dispatch(new SubscribeForumEvent($forum));
          $this->om->endFlushSuite();
      }
code: public function subscribe(Forum $forum, User $user, $selfActivation = true)
      {
          $this->om->startFlushSuite();
          $notification = new Notification();
          $notification->setUser($user);
          $notification->setForum($forum);
          $notification->setSelfActivation($selfActivation);
          $this->om->persist($notification);
          $this->dispatch(new SubscribeForumEvent($forum));
          $this->om->endFlushSuite();
      }
code_tokens: public function subscribe ( Forum $ forum , User $ user , $ selfActivation = true ) { $ this -> om -> startFlushSuite ( ) ; $ notification = new Notification ( ) ; $ notification -> setUser ( $ user ) ; $ notification -> setForum ( $ forum ) ; $ notification -> setSelfActivation ( $ selfActivation ) ; $ this -> om -> persist ( $ notification ) ; $ this -> dispatch ( new SubscribeForumEvent ( $ forum ) ) ; $ this -> om -> endFlushSuite ( ) ; }
docstring: Subscribe a user to a forum. A mail will be sent to the user each time
  a message is posted.
  
  @param \Claroline\ForumBundle\Entity\Forum $forum
  @param \Claroline\CoreBundle\Entity\User $user
docstring_tokens: Subscribe a user to a forum . A mail will be sent to the user each time a message is posted .