Ojs\ApiBundle\Controller\Admin\AnnouncementRestController::getOr404 PHP Méthode

getOr404() protected méthode

Fetch a Announcement or throw an 404 Exception.
protected getOr404 ( mixed $id ) : AdminAnnouncement
$id mixed
Résultat Ojs\AdminBundle\Entity\AdminAnnouncement
    protected function getOr404($id)
    {
        if (!($entity = $this->container->get('ojs_api.announcement.handler')->get($id))) {
            throw new NotFoundHttpException(sprintf('The resource \'%s\' was not found.', $id));
        }
        return $entity;
    }