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