src/Elements/Bundle/DemiFrontendBundle/Resources/views/Accommodation/includes/detail-templates/classifications.html.twig line 1

Open in your IDE?
  1. {% set classifications = accommodation.getClassifications() %}
  2. {% set foundClassificationIcon = false %}
  3. {%  if classifications is not empty and (classifications|length)>0 %}
  4.     {% set classifications = demi_sortAndFilterClassifications(classifications) %}
  5.         {% set foundClassificationIcon=false %}
  6.         {% for classification in classifications %}
  7.             {% if classification.demiGetIcon() and  classification.getShowAsIcon() == false %}
  8.                 {% set foundClassificationIcon=true %}
  9.             {% endif %}
  10.         {% endfor %}
  11. {% endif %}
  12. {% if foundClassificationIcon %}
  13.             <section class="mt-3">
  14.                 <div class="h5">{{ 'demi.detail.acco-classifications'|trans }}</div>
  15.                 <div class="row">
  16.                     {% for classification in classifications %}
  17.                         {% set iconSmall = classification.demiGetIcon() %}
  18.                         {% if iconSmall is not empty %}
  19.                             <div class="col col-auto">
  20.                                 <img title="{{ classification.getName() }}" class="padding-right-5" src="{{ iconSmall }}>">
  21.                             </div>
  22.                        {% endif %}
  23.                     {% endfor %}
  24.                 </div>
  25.             </section>
  26. {% endif %}