Posted By

uthopiko on 07/22/12


Tagged

forms


Versions (?)

Formulario dinamicos


 / Published in: Symfony
 

sd

  1. public function addAction()
  2. {
  3. $em = $this->get('doctrine.orm.entity_manager');
  4.  
  5. $formtype = new PromocionType('\Eros\ExtranetBundle\Form\Model\Promocion','1');
  6. $form = $this->get('form.factory')->create($formtype);
  7. $formHandler = new PromocionFormHandler($form,$this->get('request'));
  8. $process = $formHandler->process($em);
  9. if ($process) {
  10. return new RedirectResponse($this->container->get('router')->generate('_profile_edit'));
  11. }
  12. return $this->render('ErosExtranetBundle:Promociones:promocionesdetails.html.twig', array('form' => $form->createView(),'articulos'=>null));
  13. }

Report this snippet  

You need to login to post a comment.