Newscoop\GimmeBundle\Controller\AuthorsController::getAuthorTypeAction PHP Méthode

getAuthorTypeAction() public méthode

Get single author type
public getAuthorTypeAction ( $id )
    public function getAuthorTypeAction($id)
    {
        $em = $this->container->get('em');
        $authorType = $em->getRepository('Newscoop\\Entity\\AuthorType')->getAuthorType($id)->getOneOrNullResult();
        if (!$authorType) {
            throw new NotFoundHttpException('Author Type was not found.');
        }
        return $authorType;
    }