/**
  * Create work since intervention
  * @param InterventionEvent $event
  */
 public function deleteWorkFromIntervention(InterventionEvent $event)
 {
     $interv = $event->getIntervention();
     $work = $interv->getWork();
     $interv->setWork();
     $this->om->remove($work);
     $this->om->persist($interv);
     $this->om->flush();
 }
 /**
  * Create thread since intervention
  * @param InterventionEvent $event
  */
 public function deleteThread(InterventionEvent $event)
 {
     $entity = $event->getIntervention();
     $starter = $this->om->getRepository('JLMFollowBundle:StarterIntervention')->findOneBy(array('intervention' => $entity));
     $thread = $this->om->getRepository('JLMFollowBundle:Thread')->findOneBy(array('starter' => $starter));
     $this->om->remove($thread);
     $this->om->remove($starter);
     $this->om->flush();
 }