Newscoop\GimmeBundle\Controller\AuthorsController::getAuthorAction PHP 메소드

getAuthorAction() 공개 메소드

This route will be removed in 4.4
사용 중단:
public getAuthorAction ( $id )
    public function getAuthorAction($id)
    {
        $em = $this->container->get('em');
        $author = $em->getRepository('Newscoop\\Entity\\Author')->getAuthor($id)->getOneOrNullResult();
        if (!$author) {
            throw new NotFoundHttpException('Author was not found.');
        }
        return $author;
    }