59. useSensioundleodoBundlentityask; useSensioundleodoBundleormaskType; public functionnewAction() { $task =newTask(); $task->setName('Write a blog post'); $task->setDueDate(new ateTime('tomorrow')); $request = $this->getRequest(); $form = $this->createForm(newTaskType(), $task); if ($request->getMethod() =='POST') { $form->bindRequest($request); if ($form->isValid()) { // save the task to the database... return $this->redirect($this->generateUrl('success')); } } }