public function editCommentAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$comment = $em->getRepository('AppBundle:Comment')->find($id);
$form = $this->createForm(new CommentRestType(), $comment);
$form->submit($request, false);
if ($form->isValid()) {
$em->flush();
return $this->routeRedirectView('api_v1_get_comment', array('id' => $comment->getId()), Response::HTTP_NO_CONTENT);
}
$view = $this->view($form)->setTemplate('RestBundle:Comment:editComment.html.twig')->setStatusCode(Response::HTTP_NO_CONTENT);
return $this->handleView($view);
}