function 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'),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.