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