function template_preprocess_views_ui_display_tab_setting
Same name in other branches
- 8.9.x core/modules/views_ui/views_ui.theme.inc \template_preprocess_views_ui_display_tab_setting()
- 10 core/modules/views_ui/views_ui.theme.inc \template_preprocess_views_ui_display_tab_setting()
- 11.x core/modules/views_ui/views_ui.theme.inc \template_preprocess_views_ui_display_tab_setting()
Prepares variables for Views UI display tab setting templates.
Default template: views-ui-display-tab-setting.html.twig.
Parameters
array $variables: An associative array containing:
- link: The setting's primary link.
- settings_links: An array of links for this setting.
- defaulted: A boolean indicating the setting is in its default state.
- overridden: A boolean indicating the setting has been overridden from the default.
- description: The setting's description.
- description_separator: A boolean indicating a separator colon should be appended to the setting's description.
File
-
core/
modules/ views_ui/ views_ui.theme.inc, line 32
Code
function template_preprocess_views_ui_display_tab_setting(&$variables) {
// Put the primary link to the left side.
array_unshift($variables['settings_links'], $variables['link']);
if (!empty($variables['overridden'])) {
$variables['attributes']['title'][] = t('Overridden');
}
// Append a colon to the description, if requested.
if ($variables['description'] && $variables['description_separator']) {
$variables['description'] .= t(':');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.