system_theme_suggestions_maintenance_page(array $variables)
Implements hook_theme_suggestions_HOOK().
function system_theme_suggestions_maintenance_page(array $variables) { $suggestions = array(); // Dead databases will show error messages so supplying this template will // allow themers to override the page and the content completely. $offline = defined('MAINTENANCE_MODE'); try { \Drupal::service('path.matcher')->isFrontPage(); } catch (Exception $e) { // The database is not yet available. $offline = TRUE; } if ($offline) { $suggestions[] = 'maintenance_page__offline'; } return $suggestions; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!system!system.module/function/system_theme_suggestions_maintenance_page/8.1.x