original_string: public function moveMessage(Message $message, Subject $newSubject)
      {
          $this->om->startFlushSuite();
          $oldSubject = $message->getSubject();
          $message->setSubject($newSubject);
          $this->om->persist($message);
          $this->dispatch(new MoveMessageEvent($message, $oldSubject, $newSubject));
          $this->om->endFlushSuite();
      }
code: public function moveMessage(Message $message, Subject $newSubject)
      {
          $this->om->startFlushSuite();
          $oldSubject = $message->getSubject();
          $message->setSubject($newSubject);
          $this->om->persist($message);
          $this->dispatch(new MoveMessageEvent($message, $oldSubject, $newSubject));
          $this->om->endFlushSuite();
      }
code_tokens: public function moveMessage ( Message $ message , Subject $ newSubject ) { $ this -> om -> startFlushSuite ( ) ; $ oldSubject = $ message -> getSubject ( ) ; $ message -> setSubject ( $ newSubject ) ; $ this -> om -> persist ( $ message ) ; $ this -> dispatch ( new MoveMessageEvent ( $ message , $ oldSubject , $ newSubject ) ) ; $ this -> om -> endFlushSuite ( ) ; }
docstring: Move a message to an other subject.
  
  @param \Claroline\ForumBundle\Entity\Message $message
  @param \Claroline\ForumBundle\Entity\Subject $newSubject
docstring_tokens: Move a message to an other subject .