Example #1
0
 /**
  * Add a Pool to the Phase
  *
  * @Route("/{id}/new")
  * @param Phase $phase
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function newAction(Phase $phase)
 {
     $pool = new Pool();
     $pool->setName("Groupe " . (count($phase->getPools()) + 1));
     $phase->addPool($pool);
     $em = $this->getDoctrine()->getManager();
     $em->flush();
     return $this->redirect($this->generateUrl('abienvenu_kyjoukan_phase_index', ['slug_event' => $phase->getEvent()->getSlug(), 'slug' => $phase->getSlug()]) . "#pools");
 }