public function readAction(
        string $production_slug,
        int $id,
        AuthorizationCheckerInterface $auth
    ): Response {
        // Get the event and production for this action.
        list($event, $production) = $this->lookupEntity(Event::class, $id, $production_slug);

        // If this event is handled by a schedule redirect there.
        if (null !== $redirect = $this->checkSchedule($event, $production)) {
            return $redirect;
        }

        // Check permissions for this action.
        if (!$auth->isGranted('view', $event)) {
            throw new AccessDeniedException();
        }

        // Render the event.
        return new Response($this->templating->render('@BkstgSchedule/Event/read.html.twig', [
            'production' => $production,
            'event' => $event,
        ]));
    }
public function readAction(
        string $production_slug,
        int $id,
        AuthorizationCheckerInterface $auth
    ): Response {
        // Get the event and production for this action.
        list($event, $production) = $this->lookupEntity(Event::class, $id, $production_slug);

        // If this event is handled by a schedule redirect there.
        if (null !== $redirect = $this->checkSchedule($event, $production)) {
            return $redirect;
        }

        // Check permissions for this action.
        if (!$auth->isGranted('view', $event)) {
            throw new AccessDeniedException();
        }

        // Render the event.
        return new Response($this->templating->render('@BkstgSchedule/Event/read.html.twig', [
            'production' => $production,
            'event' => $event,
        ]));
    }
public function readAction ( string $ production_slug , int $ id , AuthorizationCheckerInterface $ auth ) : Response { // Get the event and production for this action. list ( $ event , $ production ) = $ this -> lookupEntity ( Event :: class , $ id , $ production_slug ) ; // If this event is handled by a schedule redirect there. if ( null !== $ redirect = $ this -> checkSchedule ( $ event , $ production ) ) { return $ redirect ; } // Check permissions for this action. if ( ! $ auth -> isGranted ( 'view' , $ event ) ) { throw new AccessDeniedException ( ) ; } // Render the event. return new Response ( $ this -> templating -> render ( '@BkstgSchedule/Event/read.html.twig' , [ 'production' => $ production , 'event' => $ event , ] ) ) ; }
Show a single event.

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

@throws AccessDeniedException When the user is not in the group.

@return Response The response.
Show a single event .