private function checkSchedule(Event $event, Production $production): ?RedirectResponse
    {
        // If this event is handled by a schedule generate a redirect there.
        if (null !== $schedule = $event->getSchedule()) {
            return new RedirectResponse($this->url_generator->generate(
                'bkstg_schedule_read',
                [
                    'production_slug' => $production->getSlug(),
                    'id' => $schedule->getId(),
                ]
            ));
        }

        return null;
    }
private function checkSchedule(Event $event, Production $production): ?RedirectResponse
    {
        // If this event is handled by a schedule generate a redirect there.
        if (null !== $schedule = $event->getSchedule()) {
            return new RedirectResponse($this->url_generator->generate(
                'bkstg_schedule_read',
                [
                    'production_slug' => $production->getSlug(),
                    'id' => $schedule->getId(),
                ]
            ));
        }

        return null;
    }
private function checkSchedule ( Event $ event , Production $ production ) : ? RedirectResponse { // If this event is handled by a schedule generate a redirect there. if ( null !== $ schedule = $ event -> getSchedule ( ) ) { return new RedirectResponse ( $ this -> url_generator -> generate ( 'bkstg_schedule_read' , [ 'production_slug' => $ production -> getSlug ( ) , 'id' => $ schedule -> getId ( ) , ] ) ) ; } return null ; }
Check if an event has a parent schedule.

@param Event      $event      The event to check.
@param Production $production The production this event is in.

@return RedirectResponse
Check if an event has a parent schedule .