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();
    }
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();
    }
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 ( ) ; }
Move a message to an other subject.

@param \Claroline\ForumBundle\Entity\Message $message
@param \Claroline\ForumBundle\Entity\Subject $newSubject
Move a message to an other subject .