public function closeSubject(Subject $subject)
    {
        $this->om->startFlushSuite();
        $subject->setIsClosed(true);
        $this->om->persist($subject);
        $this->dispatch(new CloseSubjectEvent($subject));
        $this->om->endFlushSuite();
    }
public function closeSubject(Subject $subject)
    {
        $this->om->startFlushSuite();
        $subject->setIsClosed(true);
        $this->om->persist($subject);
        $this->dispatch(new CloseSubjectEvent($subject));
        $this->om->endFlushSuite();
    }
public function closeSubject ( Subject $ subject ) { $ this -> om -> startFlushSuite ( ) ; $ subject -> setIsClosed ( true ) ; $ this -> om -> persist ( $ subject ) ; $ this -> dispatch ( new CloseSubjectEvent ( $ subject ) ) ; $ this -> om -> endFlushSuite ( ) ; }
Close a subject and no one can write in it.

@param \Claroline\ForumBundle\Entity\Subject $subject
Close a subject and no one can write in it .