function ClaroHooks::preprocessMenuLocalTaskViewsUi

Implements hook_preprocess_HOOK() for menu-local-task Views UI templates.

Attributes

#[Hook('preprocess_menu_local_task__views_ui')]

File

core/themes/claro/src/Hook/ClaroHooks.php, line 129

Class

ClaroHooks
Hook implementations for claro.

Namespace

Drupal\claro\Hook

Code

public function preprocessMenuLocalTaskViewsUi(&$variables) : void {
  // Remove 'tabs__link' without adding a new class because it couldn't be
  // used reliably.
  // @see https://www.drupal.org/node/3051605
  $link_class_index = array_search('tabs__link', $variables['link']['#options']['attributes']['class']);
  if ($link_class_index !== FALSE) {
    unset($variables['link']['#options']['attributes']['class'][$link_class_index]);
  }
}

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