{% endmacro %}
{% macro data_table_column_class(name, columns, column) %}
{% spaceless %}
{% set class = '' %}
{% set always = false %}
{% if columns[column] is defined %}
{% set classes = columns[column] %}
{% if 'alwaysVisible' in classes %}
{# as this column should always be visible, we remove every class that includes hidden #}
{% for tmp in classes|split(' ') %}
{% if 'hidden' not in tmp %}
{% set class = class ~ ' ' ~ tmp %}
{% endif %}
{% endfor %}
{% else %}
{% if not is_visible_column(name, column) %}
{% set classes = classes ~ ' hidden' %}
{% elseif not is_datatable_configured(name) %}
{% for tmp in classes|split(' ') %}
{% if 'hidden' == tmp %}
{% set classes = classes|replace({(tmp): ''}) %}
{% endif %}
{% endfor %}
{% else %}
{% for tmp in classes|split(' ') %}
{% if 'hidden' in tmp %}
{% set classes = classes|replace({(tmp): ''}) %}
{% endif %}
{% endfor %}
{% endif %}
{% set class = classes %}
{% endif %}
{% endif %}
{% if not class is empty %}
{{ class }}
{% endif %}
{% endspaceless %}
{% endmacro %}
{% macro data_table_header_options(name, columns, options) %}
{% set skipStripped = options.skipStripped|default(false) %}
{% set reloadEvent = options.reloadEvent|default('') %}
{% set translationDomain = options.translationDomain|default('messages') %}
{# |default does not work here, as the prefix might be an empty string #}
{% set translationPrefix = 'label.' %}
{% if options.translationPrefix is defined %}
{% set translationPrefix = options.translationPrefix %}
{% endif %}
{% import _self as macro %}
{%- for title, class in columns -%}
{% if title is not empty and title != 'actions' %}{{ (translationPrefix ~ title)|trans({}, translationDomain) }}{% endif %}