/**
  * Creates a new Comment entity for the video.
  *
  */
 public function videoCommentCreateAction($slug)
 {
     $translator = $this->get('translator');
     $em = $this->getDoctrine()->getManager();
     // get video
     $video = $em->getRepository('VideoBundle:Video')->findOneBy(array('slug' => $slug));
     if (!$video) {
         throw $this->createNotFoundException($translator->trans('AdministrationBundle.notFound', array("%name%" => "video")));
         //'Unable to find Type entity.');
     }
     // get user
     $user = $this->getUser();
     // get lang
     $lang = $this->get('request')->get('lang');
     if (!$lang) {
         $lang = "en";
     }
     // get comment
     $comment = $this->get('request')->get('comment');
     // add comment
     if ($comment) {
         $entity = new Comment();
         $entity->setVideo($video);
         $entity->setUser($user);
         $entity->setLang($lang);
         $entity->setComment($comment);
         $em->persist($entity);
         $em->flush();
     }
     // get all comments
     $comments = $em->getRepository('EventBundle:Comment')->getCommentsByVideo($video, $lang);
     $templating = $this->get('templating');
     $reponse = $templating->render('EventBundle:Congres:comments.html.twig', array('comments' => $comments));
     // return Response
     return new Response($reponse);
 }