Controller/CrudController.php
protected function createEditForm($entity)
    {
        $form = $this->createForm(
            $this->getEditFormType(), $entity, [
                'action' => $this->generateUrl($this->getRouteName() . "Edit", $this->getRouteParams(['id' => $entity->getId()])),
                'method' => 'POST',
            ]
        );

        return $form;
    }
protected function createEditForm($entity)
    {
        $form = $this->createForm(
            $this->getEditFormType(), $entity, [
                'action' => $this->generateUrl($this->getRouteName() . "Edit", $this->getRouteParams(['id' => $entity->getId()])),
                'method' => 'POST',
            ]
        );

        return $form;
    }
protected function createEditForm ( $ entity ) { $ form = $ this -> createForm ( $ this -> getEditFormType ( ) , $ entity , [ 'action' => $ this -> generateUrl ( $ this -> getRouteName ( ) . "Edit" , $ this -> getRouteParams ( [ 'id' => $ entity -> getId ( ) ] ) ) , 'method' => 'POST' , ] ) ; return $ form ; }
Creates a form to edit an entity.

@param mixed $entity The entity

@return \Symfony\Component\Form\Form The form
Creates a form to edit an entity .