function simple_megamenu_theme_suggestions_simple_mega_menu in Simple Mega Menu 8
Same name and namespace in other branches
- 2.0.x simple_megamenu.module \simple_megamenu_theme_suggestions_simple_mega_menu()
Implements hook_theme_suggestions_HOOK().
File
- ./
simple_megamenu.module, line 54 - Contains simple_megamenu.module.
Code
function simple_megamenu_theme_suggestions_simple_mega_menu(array $variables) {
$suggestions = [];
$entity = $variables['elements']['#simple_mega_menu'];
$sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');
$suggestions[] = 'simple_mega_menu__' . $sanitized_view_mode;
$suggestions[] = 'simple_mega_menu__' . $entity
->bundle();
$suggestions[] = 'simple_mega_menu__' . $entity
->bundle() . '__' . $sanitized_view_mode;
$suggestions[] = 'simple_mega_menu__' . $entity
->id();
$suggestions[] = 'simple_mega_menu__' . $entity
->id() . '__' . $sanitized_view_mode;
return $suggestions;
}