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