public function readAction(
        int $id,
        string $production_slug,
        AuthorizationCheckerInterface $auth
    ): Response {
        list($resource, $production) = $this->lookupEntity(Resource::class, $id, $production_slug);

        if (!$auth->isGranted('view', $resource)) {
            throw new AccessDeniedException();
        }

        return new Response($this->templating->render(
            '@BkstgResource/Resource/read.html.twig',
            [
                'production' => $production,
                'resource' => $resource,
            ]
        ));
    }
public function readAction(
        int $id,
        string $production_slug,
        AuthorizationCheckerInterface $auth
    ): Response {
        list($resource, $production) = $this->lookupEntity(Resource::class, $id, $production_slug);

        if (!$auth->isGranted('view', $resource)) {
            throw new AccessDeniedException();
        }

        return new Response($this->templating->render(
            '@BkstgResource/Resource/read.html.twig',
            [
                'production' => $production,
                'resource' => $resource,
            ]
        ));
    }
public function readAction ( int $ id , string $ production_slug , AuthorizationCheckerInterface $ auth ) : Response { list ( $ resource , $ production ) = $ this -> lookupEntity ( Resource :: class , $ id , $ production_slug ) ; if ( ! $ auth -> isGranted ( 'view' , $ resource ) ) { throw new AccessDeniedException ( ) ; } return new Response ( $ this -> templating -> render ( '@BkstgResource/Resource/read.html.twig' , [ 'production' => $ production , 'resource' => $ resource , ] ) ) ; }
Read a resource from this production.

@param int                           $id              The resource id.
@param string                        $production_slug The production slug.
@param AuthorizationCheckerInterface $auth            The authorization checker service.

@throws AccessDeniedException When the user does not have access to view the resource.

@return Response
Read a resource from this production .