function OliveroHooks::preprocessMenuLocalTasks
Implements hook_preprocess_HOOK() for menu-local-tasks.
Attributes
#[Hook('preprocess_menu_local_tasks')]
File
-
core/
themes/ olivero/ src/ Hook/ OliveroHooks.php, line 209
Class
- OliveroHooks
- Hook implementations for olivero.
Namespace
Drupal\olivero\HookCode
public function preprocessMenuLocalTasks(&$variables) : void {
foreach (Element::children($variables['primary']) as $key) {
$variables['primary'][$key]['#level'] = 'primary';
}
foreach (Element::children($variables['secondary']) as $key) {
$variables['secondary'][$key]['#level'] = 'secondary';
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.