public function moveSubject(Subject $subject, Category $newCategory)
    {
        $this->om->startFlushSuite();
        $oldCategory = $subject->getCategory();
        $subject->setCategory($newCategory);
        $this->om->persist($subject);
        $this->dispatch(new MoveSubjectEvent($subject, $oldCategory, $newCategory));
        $this->om->endFlushSuite();
    }
public function moveSubject(Subject $subject, Category $newCategory)
    {
        $this->om->startFlushSuite();
        $oldCategory = $subject->getCategory();
        $subject->setCategory($newCategory);
        $this->om->persist($subject);
        $this->dispatch(new MoveSubjectEvent($subject, $oldCategory, $newCategory));
        $this->om->endFlushSuite();
    }
public function moveSubject ( Subject $ subject , Category $ newCategory ) { $ this -> om -> startFlushSuite ( ) ; $ oldCategory = $ subject -> getCategory ( ) ; $ subject -> setCategory ( $ newCategory ) ; $ this -> om -> persist ( $ subject ) ; $ this -> dispatch ( new MoveSubjectEvent ( $ subject , $ oldCategory , $ newCategory ) ) ; $ this -> om -> endFlushSuite ( ) ; }
Move a subject to an other category.

@param \Claroline\ForumBundle\Entity\Subject $subject
@param \Claroline\ForumBundle\Entity\Category $newCategory
Move a subject to an other category .