8.2.x theme.inc template_preprocess_maintenance_page(&$variables)
8.0.x theme.inc template_preprocess_maintenance_page(&$variables)
8.1.x theme.inc template_preprocess_maintenance_page(&$variables)
8.3.x theme.inc template_preprocess_maintenance_page(&$variables)
6.x theme.maintenance.inc template_preprocess_maintenance_page(&$variables)
7.x theme.inc template_preprocess_maintenance_page(&$variables)

Prepares variables for maintenance page templates.

Default template: maintenance-page.html.twig.

Parameters

array $variables: An associative array containing:

  • content - An array of page content.

See also

system_page_attachments()

1 call to template_preprocess_maintenance_page()
template_preprocess_install_page in core/includes/theme.inc
Prepares variables for install page templates.

File

core/includes/theme.inc, line 1456
The theme system, which controls the output of Drupal.

Code

function template_preprocess_maintenance_page(&$variables) {
  // @todo Rename the templates to page--maintenance + page--install.
  template_preprocess_page($variables);

  // @see system_page_attachments()
  $variables['#attached']['library'][] = 'system/maintenance';

  // Maintenance page and install page need branding info in variables because
  // there is no blocks.
  $site_config = \Drupal::config('system.site');
  $variables['logo'] = theme_get_setting('logo.url');
  $variables['site_name'] = $site_config->get('name');
  $variables['site_slogan'] = $site_config->get('slogan');

  // Maintenance page and install page need page title in variable because there
  // are no blocks.
  $variables['title'] = $variables['page']['#title'];
}