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);
}