tablesort-indicator.html.twig
Same filename in this branch
Same filename in other branches
- 9 core/themes/stable9/templates/admin/tablesort-indicator.html.twig
- 9 core/themes/claro/templates/admin/tablesort-indicator.html.twig
- 9 core/themes/stable/templates/admin/tablesort-indicator.html.twig
- 9 core/modules/system/templates/tablesort-indicator.html.twig
- 10 core/themes/stable9/templates/admin/tablesort-indicator.html.twig
- 10 core/themes/claro/templates/admin/tablesort-indicator.html.twig
- 10 core/modules/system/templates/tablesort-indicator.html.twig
- 11.x core/themes/stable9/templates/admin/tablesort-indicator.html.twig
- 11.x core/themes/claro/templates/admin/tablesort-indicator.html.twig
- 11.x core/modules/system/templates/tablesort-indicator.html.twig
Theme override for displaying a tablesort indicator.
Available variables:
- style: Either 'asc' or 'desc', indicating the sorting direction.
2 theme calls to tablesort-indicator.html.twig
- TableSort::header in core/
lib/ Drupal/ Core/ Utility/ TableSort.php - Formats a column header.
- template_preprocess_views_view_table in core/
modules/ views/ views.theme.inc - Prepares variables for views table templates.
File
-
core/
themes/ stable/ templates/ admin/ tablesort-indicator.html.twig
View source
- {#
- /**
- * @file
- * Theme override for displaying a tablesort indicator.
- *
- * Available variables:
- * - style: Either 'asc' or 'desc', indicating the sorting direction.
- */
- #}
- {%
- set classes = [
- 'tablesort',
- 'tablesort--' ~ style,
- ]
- %}
- <span{{ attributes.addClass(classes) }}>
- <span class="visually-hidden">
- {% if style == 'asc' -%}
- {{ 'Sort ascending'|t }}
- {% else -%}
- {{ 'Sort descending'|t }}
- {% endif %}
- </span>
- </span>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.