Example #1
0
 /**
  * @param $name
  * @param $permaLink
  * @param Etude $entity
  * Used  only in Mgate\CommentBundle\Controller\DefaultController for undocumented purpose (maintenance ??)
  */
 public function creerThread($name, $permaLink, Etude $entity)
 {
     if (!$entity->getThread()) {
         $thread = $this->tm->createThread($name . $entity->getId());
         $thread->setPermalink($permaLink);
         //non exploité dans notre cas. Commentable.
         $entity->setThread($thread);
         //persist thread inutile, car cascade sur $entity.
         $this->em->flush();
     }
 }
 private function createDeleteForm(Etude $etude)
 {
     return $this->createFormBuilder(array('id' => $etude->getId()))->add('id', 'hidden')->getForm();
 }
 public function getGroupePhasesByEtude(Etude $etude)
 {
     $qb = $this->_em->createQueryBuilder();
     $query = $qb->select('g')->from('MgateSuiviBundle:GroupePhases', 'g')->innerJoin('g.etude', 'e')->where('e.id = :etudeID')->orderBy('g.numero', 'ASC')->setParameter('etudeID', $etude->getId());
     return $query;
 }