original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Move a subject to an other category.
  
  @param \Claroline\ForumBundle\Entity\Subject $subject
  @param \Claroline\ForumBundle\Entity\Category $newCategory
docstring_tokens: Move a subject to an other category .