Acme\DemoBundle\Controller\TodoController::editTodosAction PHP Метод

editTodosAction() публичный метод

Presents the form to use to update an existing todo.
public editTodosAction ( integer $id ) : Response
$id integer the todo id
Результат Symfony\Component\HttpFoundation\Response
    public function editTodosAction($id)
    {
        $todo = $this->getDoctrine()->getRepository('AcmeDemoBundle:Todo')->find($id);
        if (!$todo) {
            throw $this->createNotFoundException("Todo does not exist.");
        }
        $form = $this->createForm(new TodoType(), $todo);
        $view = $this->view($form, 200)->setTemplate('AcmeDemoBundle:Todo:editTodo.html.twig')->setTemplateVar('form');
        return $this->handleView($view);
    }