{% if flash is iterable %} {{ flash.message|trans(flash.parameters, 'flashes') }} {% else %} {{ flash|trans({}, 'flashes') }} {% endif %}
{% if app.session is not null and app.session.started %} {% for type in ['success', 'error', 'info', 'warning'] %} {% for flash in app.session.flashbag.get(type) %} {% if 'error' == type %} {% set result = 'danger' %} {% set icon = 'exclamation-triangle-fill' %} {% endif %} {% if 'info' == type %} {% set result = 'info' %} {% set icon = 'info-fill' %} {% endif %} {% if 'warning' == type %} {% set result = 'warning' %} {% set icon = 'exclamation-triangle-fill' %} {% endif %}
{% endfor %} {% endfor %} {% endif %}