function OliveroHooks::themeSuggestionsMenuAlter

Implements hook_theme_suggestions_HOOK_alter() for menu.

Attributes

#[Hook('theme_suggestions_menu_alter')]

File

core/themes/olivero/src/Hook/OliveroHooks.php, line 134

Class

OliveroHooks
Hook implementations for olivero.

Namespace

Drupal\olivero\Hook

Code

public function themeSuggestionsMenuAlter(&$suggestions, array $variables) : void {
  if (isset($variables['attributes']['region'])) {
    $suggestions[] = 'menu__' . $variables['attributes']['region'];
  }
}

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