@trigger_error('Calling MaintenanceModeSubscriber::__construct() without the $event_dispatcher argument is deprecated in drupal:9.4.0 and the $event_dispatcher argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3255799',E_USER_DEPRECATED);
$response=$this->bareHtmlPageRenderer->renderBarePage(['#markup'=>$this->getSiteMaintenanceMessage()],$this->t('Site under maintenance'),'maintenance_page');
$response->setStatusCode(503);
$event->setResponse($response);
// When the account is not exempt, other subscribers handle request.
// Calling RequestEvent::setResponse() also stops propagation of event.
$event->setResponse($response);
return;
}
drupal_maintenance_theme();
$response=$this->bareHtmlPageRenderer->renderBarePage(['#markup'=>$this->maintenanceMode->getSiteMaintenanceMessage()],$this->t('Site under maintenance'),'maintenance_page');
$response->setStatusCode(503);
// Calling RequestEvent::setResponse() also stops propagation of the event.
$event->setResponse($response);
}
/**
@@ -157,6 +169,10 @@ protected function getSiteMaintenanceMessage() {
@trigger_error('Calling MaintenanceMode::__construct() without the $config_factory argument is deprecated in drupal:9.4.0 and the $config_factory argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3255815',E_USER_DEPRECATED);