function ViewsUiThemeHooks::preprocessDisplayTabBucket
Prepares variables for Views UI display tab bucket templates.
Default template: views-ui-display-tab-bucket.html.twig.
Parameters
array $variables: An associative array containing:
- element: An associative array containing the properties of the element. Properties used: #name, #overridden, #children, #title, #actions.
File
-
core/
modules/ views_ui/ src/ Hook/ ViewsUiThemeHooks.php, line 179
Class
- ViewsUiThemeHooks
- Hook implementations for views_ui.
Namespace
Drupal\views_ui\HookCode
public function preprocessDisplayTabBucket(array &$variables) : void {
$element = $variables['element'];
if (!empty($element['#overridden'])) {
$variables['attributes']['title'][] = $this->t('Overridden');
}
$variables['name'] = $element['#name'] ?? NULL;
$variables['overridden'] = $element['#overridden'] ?? NULL;
$variables['content'] = $element['#children'];
$variables['title'] = $element['#title'];
$variables['actions'] = !empty($element['#actions']) ? $element['#actions'] : [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.