src/EventsBundle/Controller/agendaController.php
/**
     * Displays a form to edit an existing agenda entity.
     *
     */
Displays a form to edit an existing agenda entity.
Displays a form to edit an existing agenda entity .
public function editAction(Request $request, agenda $agenda)
    {
        $deleteForm = $this->createDeleteForm($agenda);
        $editForm = $this->createForm('EventsBundle\Form\agendaType', $agenda);
        $editForm->handleRequest($request);
        if ($editForm->isSubmitted() && $editForm->isValid()) {
            $this->getDoctrine()->getManager()->flush();
            return $this->redirectToRoute('agenda_edit', array('id' => $agenda->getId()));
        }
        return $this->render('agenda/edit.html.twig', array(
            'agenda' => $agenda,
            'edit_form' => $editForm->createView(),
            'delete_form' => $deleteForm->createView(),
        ));
    }
public function editAction ( Request $ request , agenda $ agenda ) { $ deleteForm = $ this -> createDeleteForm ( $ agenda ) ; $ editForm = $ this -> createForm ( 'EventsBundle\Form\agendaType' , $ agenda ) ; $ editForm -> handleRequest ( $ request ) ; if ( $ editForm -> isSubmitted ( ) && $ editForm -> isValid ( ) ) { $ this -> getDoctrine ( ) -> getManager ( ) -> flush ( ) ; return $ this -> redirectToRoute ( 'agenda_edit' , array ( 'id' => $ agenda -> getId ( ) ) ) ; } return $ this -> render ( 'agenda/edit.html.twig' , array ( 'agenda' => $ agenda , 'edit_form' => $ editForm -> createView ( ) , 'delete_form' => $ deleteForm -> createView ( ) , ) ) ; }
Displays a form to edit an existing agenda entity.
Displays a form to edit an existing agenda entity .