{% import 'macros.html.twig' as macros %} {% for elt in companydomiciliations %} {% set downloadDomiciliationFileName = macros.cleanstring(attribute(elt, 'domiciliationimg'), 0, 46)|trim|replace({' ': '_'}) %} {% set extension = attribute(elt, 'domiciliationimg')|split('.')|last|lower %} {% set cleanedName = macros.cleanstring(attribute(elt, 'domiciliationimg'), 0, 23) %} {% set cutCleanedName = macros.cutstring(cleanedName, 14, 12) %}
{% if extension == 'pdf' %}
{% elseif extension in ['jpg', 'jpeg', 'png', 'gif', 'webp'] %}
element graphique
{% else %}
logo element graphique
{{ extension|upper }}
{% endif %}

{{ cutCleanedName }}

{% if extension in ['pdf', 'jpg', 'jpeg', 'png', 'gif', 'webp'] %}

voir

{% endif %}

télécharger

{% if userRole == 'ROLE_ADMIN' %}
{% endif %}
{% if extension == 'pdf' %} {% endif %} {% endfor %}