public function getCommentsFromPostAction($id) { $em = $this->getDoctrine()->getManager(); $postComments = $em->getRepository('AppBundle:Post')->find($id); $view = new View($postComments->getComments()); return $this->handleView($view); }