Newscoop\GimmeBundle\Controller\CommentsController::getCommentAction PHP Méthode

getCommentAction() public méthode

Get comment
public getCommentAction ( $id ) : Form
Résultat 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;
    }