{% set starsList = pimcore_relations('starsList').getElements() %}
{% set filterTexte = [] %}
{% if starsList is not empty %}
<li class="mb-3">
<button class="form-box form-box--collapsible collapsed"
type="button"
data-toggle="collapse"
data-target="#stars-{{ isSearch ? "additional-search" : "filter" }}-overlay"
aria-expanded="false"
aria-controls="stars-{{ isSearch ? "additional-search" : "filter" }}-overlay">
<span class="form-box__label">{{ "demi.filter.stars"|trans }}</span>
<span class="form-box__content text-truncate {{ isSearch ? "js-additional-search-overlay" : "js-filter-form" }}__group-label"
data-filter-name="stars[]"
data-default-text="{{ "demi.filter.all-stars"|trans }}">
{{ "demi.filter.all-stars"|trans }}
</span>
<span class="demi-icon demi-icon-chevron-down form-box__icon" aria-label="{{ "demi.filter.open"|trans }}"></span>
</button>
<section id="stars-{{ isSearch ? "additional-search" : "filter" }}-overlay"
aria-expanded="false"
class="collapse js-collapse-in-viewport">
<div class="form-box__detail p-3">
<ul class="list-inline list-inline--gutter-6">
{% for star in starsList %}
{% set paramName = '' %}
{% if star is instanceof("Pimcore\\Model\\DataObject\\DemiStars") %}
{% set paramName = 'stars' %}
{% set filterTexte = filterTexte + {
'name' : paramName ~ '[]',
'value' : star.getId(),
'text' : star.getName(),
'label': "demi.filter.stars" |trans
} %}
<li class="list-inline-item">
{{ include('@ElementsDemiFrontend/Includes/elements/buttons/toggle-button.html.twig', {
'type' : 'checkbox',
'text' : star.getName(),
'styleModifier' : 'js-additional-search-overlay__default-input js-filter-form__default-input ',
'name' : paramName ~ '[]',
'value' : star.getId(),
'hasIcon' : true,
'bubbles' : true
}) }}
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</section>
</li>
{% endif %}
<script type="text/javascript" data-cookieconsent="ignore">
_filterTexte = window['_filterTexte'] || [];
_filterTexte.push.apply( _filterTexte, {{ filterTexte|json_encode|raw }} );
</script>