{#
/**
* @var \\Pimcore\\Templating\\PhpEngine this
* @var \\Pimcore\\Templating\\PhpEngine view
* @var \\Pimcore\\Templating\\GlobalVariables app
* #
* @var showFilter
* @var \\Elements\\Demi\\Accommodation\\Search\\Parameter searchParam
#}
{% set filterTexte = [] %}
{% set options = [] %}
{% set classificationsList = pimcore_relations('classificationsList').getElements() %}
{% if classificationsList is not empty %}
{% set paramName = 'classifications' %}
{% for star in classificationsList | filter (star => star is instanceof("\\Pimcore\\Model\\DataObject\\DemiClassification")) %}
{% set options = options | merge([{
'type' : 'checkbox',
'text' : star.getName(),
'label' : star.getName(),
'styleModifier' : 'js-filter-form__default-input fz16',
'name' : paramName ~ '[]',
'value' : star.getId()
}]) %}
{% set filterTexte = filterTexte | merge([{
'name' : paramName ~ '[]',
'value' : star.getId(),
'text' : star.getName(),
'label': 'demi.filter.classifications' | trans
}]) %}
{% endfor %}
{% set labelName = 'demi.filter.classifications' | trans %}
{% set allFilterName = 'demi.filter.all-classifications' | trans %}
{% set popoverName = demi_getKeyFromString( labelName ) %}
{% set elementName = 'classifications[]' %}
{{ include("@ElementsDemiFrontend/Includes/filterSnippet-buttons.desktop.html.twig", {
"showFilter" : showFilter,
"label" : labelName,
'content' : allFilterName,
'defaultText' : allFilterName,
'filterName' : elementName,
'popoverName' : popoverName,
'filterId' : popoverName,
'filterTexte' : filterTexte,
'name' : elementName,
'options' : options,
'showHr' : true,
'hideClasses' : '',
"onlyShowIfSubmitted" : false,
"isSubmitted" : false,
"hasIdPrefix" : false,
"filterVal" : ''
}) }}
{% endif %}