Newscoop\GimmeBundle\Controller\CommentsController::getCommentAction PHP Method

getCommentAction() public method

Get comment
public getCommentAction ( $id ) : Form
return Form
    public function getCommentAction($id)
    {
        $em = $this->container->get('em');
        $comment = $em->getRepository('Newscoop\\Entity\\Comment')->getComment($id, false)->getOneOrNullResult();
        if (!$comment) {
            throw new EntityNotFoundException('Result was not found.');
        }
        return $comment;
    }