function PreprocessHooks::viewsUiDisplayTabBucket

Same name and namespace in other branches
  1. main core/themes/admin/src/Hook/PreprocessHooks.php \Drupal\admin\Hook\PreprocessHooks::viewsUiDisplayTabBucket()

Implements hook_preprocess_HOOK() for views_ui_display_tab_bucket.

Attributes

#[Hook('preprocess_views_ui_display_tab_bucket')]

File

core/themes/admin/src/Hook/PreprocessHooks.php, line 1381

Class

PreprocessHooks
Provides preprocess implementations.

Namespace

Drupal\admin\Hook

Code

public function viewsUiDisplayTabBucket(array &$variables) : void {
  // Instead of re-styling Views UI dropbuttons with module-specific CSS
  // styles, change dropbutton variants to the extra small version.
  // @todo Revisit after https://www.drupal.org/node/3057581 is added.
  if (!empty($variables['actions']) && $variables['actions']['#type'] === 'dropbutton') {
    $variables['actions']['#dropbutton_type'] = 'extrasmall';
  }
}

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