Determine whether the page is configured to be offline.
\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The Event to process.
public function onKernelRequestDetermineSiteStatus(GetResponseEvent $event) {
// Check if the site is offline.
$request = $event
->getRequest();
$is_offline = _menu_site_is_offline() ? MENU_SITE_OFFLINE : MENU_SITE_ONLINE;
$request->attributes
->set('_maintenance', $is_offline);
}