src/AppBundle/Controller/Tienda/PeticionController.php
/**
     * Displays a form to edit an existing peticion entity.
     *
     * @Route("/{id}/edit", name="tienda_peticion_edit")
     * @Method({"GET", "POST"})
     */
Displays a form to edit an existing peticion entity.
Displays a form to edit an existing peticion entity .
public function editAction(Request $request, Peticion $peticion)
    {
        $deleteForm = $this->createDeleteForm($peticion);
        $editForm = $this->createForm('AppBundle\Form\Tienda\PeticionType', $peticion);
        $editForm->handleRequest($request);
        if ($editForm->isSubmitted() && $editForm->isValid()) {
            $this->getDoctrine()->getManager()->flush();
            return $this->redirectToRoute('tienda_peticion_edit', array('id' => $peticion->getId()));
        }
        return $this->render('tienda/peticion/edit.html.twig', array(
            'peticion' => $peticion,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ));
    }
public function editAction ( Request $ request , Peticion $ peticion ) { $ deleteForm = $ this -> createDeleteForm ( $ peticion ) ; $ editForm = $ this -> createForm ( 'AppBundle\Form\Tienda\PeticionType' , $ peticion ) ; $ editForm -> handleRequest ( $ request ) ; if ( $ editForm -> isSubmitted ( ) && $ editForm -> isValid ( ) ) { $ this -> getDoctrine ( ) -> getManager ( ) -> flush ( ) ; return $ this -> redirectToRoute ( 'tienda_peticion_edit' , array ( 'id' => $ peticion -> getId ( ) ) ) ; } return $ this -> render ( 'tienda/peticion/edit.html.twig' , array ( 'peticion' => $ peticion , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ) ; }
Displays a form to edit an existing peticion entity.
Displays a form to edit an existing peticion entity .