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