vendor/sylius/sylius/src/Sylius/Bundle/UiBundle/Resources/views/_flashes.html.twig line 1

Open in your IDE?
  1. {% if app.session is not null and app.session.started %}
  2. {% for type in ['success', 'error', 'info', 'warning'] %}
  3. {% for flash in app.session.flashbag.get(type) %}
  4. {% if 'error' == type %}
  5. {% set result = 'negative' %}
  6. {% set icon = 'remove' %}
  7. {% endif %}
  8. {% if 'info' == type %}
  9. {% set result = 'info' %}
  10. {% set icon = 'info' %}
  11. {% endif %}
  12. <div class="ui icon {{ result|default('positive') }} message sylius-flash-message">
  13. <i class="close icon"></i>
  14. <i class="{{ icon|default('checkmark') }} icon"></i>
  15. <div class="content">
  16. <div class="header">
  17. {% set header = 'sylius.ui.'~type %}
  18. {{ header|trans }}
  19. </div>
  20. <p {{ sylius_test_html_attribute('flash-messages') }}>
  21. {% if flash is iterable %}
  22. {{ flash.message|trans(flash.parameters, 'flashes') }}
  23. {% else %}
  24. {{ flash|trans({}, 'flashes') }}
  25. {% endif %}
  26. </p>
  27. </div>
  28. </div>
  29. {% endfor %}
  30. {% endfor %}
  31. {% endif %}