You are here

protected function MaintenanceModeSubscriber::getSiteMaintenanceMessage in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php \Drupal\Core\EventSubscriber\MaintenanceModeSubscriber::getSiteMaintenanceMessage()

Gets the site maintenance message.

Return value

\Drupal\Component\Render\MarkupInterface The formatted site maintenance message.

1 call to MaintenanceModeSubscriber::getSiteMaintenanceMessage()
MaintenanceModeSubscriber::onKernelRequestMaintenance in core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php
Returns the site maintenance page if the site is offline.

File

core/lib/Drupal/Core/EventSubscriber/MaintenanceModeSubscriber.php, line 148

Class

MaintenanceModeSubscriber
Maintenance mode subscriber for controller requests.

Namespace

Drupal\Core\EventSubscriber

Code

protected function getSiteMaintenanceMessage() {
  return new FormattableMarkup($this->config
    ->get('system.maintenance')
    ->get('message'), [
    '@site' => $this->config
      ->get('system.site')
      ->get('name'),
  ]);
}