Ojs\ApiBundle\Controller\Admin\LangRestController::getOr404 PHP Method

getOr404() protected method

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