function template_preprocess_views_ui_display_tab_setting

template_preprocess_views_ui_display_tab_setting(&$variables)

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 31
Preprocessors and theme functions for the Views UI.

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(':');
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views_ui!views_ui.theme.inc/function/template_preprocess_views_ui_display_tab_setting/8.1.x