src/Cpm/JovenesBundle/Controller/PresentacionInternaController.php
/**
     * Edits an existing PresentacionInterna entity.
     *
     * @Route("/{id}/update", name="presentacioninterna_update")
     * @Method("post")
     * @Template("CpmJovenesBundle:PresentacionInterna:edit.html.twig")
     */
Edits an existing PresentacionInterna entity.
Edits an existing PresentacionInterna entity .
public function updateAction($id)
    {
        $entity = $this->getEntityForUpdate('CpmJovenesBundle:PresentacionInterna', $id);
        $editForm   = $this->createForm(new PresentacionInternaType(), $entity);
        $request = $this->getRequest();
        $editForm->bindRequest($request);
        if ($editForm->isValid()) {
        	$em = $this->getDoctrine()->getEntityManager();
            $em->persist($entity);
            $em->flush();
            return $this->redirect($this->generateUrl('presentacion_show', array('id' => $id)));
        }
        return array(
            'entity'      => $entity,
            'edit_form'   => $editForm->createView(),
        );
    }
public function updateAction ( $ id ) { $ entity = $ this -> getEntityForUpdate ( 'CpmJovenesBundle:PresentacionInterna' , $ id ) ; $ editForm = $ this -> createForm ( new PresentacionInternaType ( ) , $ entity ) ; $ request = $ this -> getRequest ( ) ; $ editForm -> bindRequest ( $ request ) ; if ( $ editForm -> isValid ( ) ) { $ em = $ this -> getDoctrine ( ) -> getEntityManager ( ) ; $ em -> persist ( $ entity ) ; $ em -> flush ( ) ; return $ this -> redirect ( $ this -> generateUrl ( 'presentacion_show' , array ( 'id' => $ id ) ) ) ; } return array ( 'entity' => $ entity , 'edit_form' => $ editForm -> createView ( ) , ) ; }
Edits an existing PresentacionInterna entity.
Edits an existing PresentacionInterna entity .