Esempio n. 1
0
 /**
  * @param $clubId
  *
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function newAction($clubId)
 {
     $team = new Teams();
     $club = $this->get('clubs')->findOneById($clubId);
     $team->setClub($club);
     $team->setUser($this->getUser());
     $form = $this->createCreateForm($team, $clubId);
     return $this->render('FfjvBoBundle:Teams:new.html.twig', array('team' => $team, 'club' => $club, 'form' => $form->createView()));
 }
Esempio n. 2
0
 /**
  * @param Teams $team
  * @return \Symfony\Component\Form\Form
  */
 private function getDeleteForm(Teams $team)
 {
     return $this->createFormBuilder()->setAction($this->generateUrl('fo_teams_delete', array('teamId' => $team->getId())))->setMethod('DELETE')->add('submit', SubmitType::class, ['label' => 'Confirmer', 'attr' => ["class" => "btn btn-danger"]])->getForm();
 }