/** * @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())); }