/ Published in: Symfony
sd
Expand |
Embed | Plain Text
public function addAction() { $em = $this->get('doctrine.orm.entity_manager'); $formtype = new PromocionType('\Eros\ExtranetBundle\Form\Model\Promocion','1'); $form = $this->get('form.factory')->create($formtype); $formHandler = new PromocionFormHandler($form,$this->get('request')); $process = $formHandler->process($em); if ($process) { return new RedirectResponse($this->container->get('router')->generate('_profile_edit')); } return $this->render('ErosExtranetBundle:Promociones:promocionesdetails.html.twig', array('form' => $form->createView(),'articulos'=>null)); }
You need to login to post a comment.
