function claro_theme_suggestions_maintenance_page_alter in Drupal 10
Implements hook_theme_suggestions_maintenance_page_alter().
File
- core/
themes/ claro/ claro.theme, line 332 - Functions to support theming in the Claro theme.
Code
function claro_theme_suggestions_maintenance_page_alter(&$suggestions) {
try {
$is_front = \Drupal::service('path.matcher')
->isFrontPage();
} catch (Exception $e) {
// An exception could mean that the database is offline. This scenario
// should also be rendered using the frontpage template.
$is_front = TRUE;
}
if ($is_front) {
// Add theme suggestion for maintenance page rendered as front page. This
// allows separating different applications such as update.php from the
// actual maintenance page.
$suggestions[] = 'maintenance_page__front';
}
}