templates/_flashbag.html.twig line 1

Open in your IDE?
  1. {% set doublons = [] %}
  2. {% for label, messages in app.flashes %}
  3.     {% for message in messages %}
  4.         {% if message not in doublons %}
  5.             <script>
  6.                 toastr.options = {
  7.                     "closeButton": true,
  8.                     "debug": false,
  9.                     "newestOnTop": false,
  10.                     "progressBar": true,
  11.                     "positionClass": "toast-bottom-right",
  12.                     "preventDuplicates": false,
  13.                     "onclick": null,
  14.                     "showDuration": "300",
  15.                     "hideDuration": "1000",
  16.                     "timeOut": "5000",
  17.                     "extendedTimeOut": "4000",
  18.                     "showEasing": "swing",
  19.                     "hideEasing": "linear",
  20.                     "showMethod": "fadeIn",
  21.                     "hideMethod": "fadeOut"
  22.                 };
  23.                 toastr.{{ label }}("{{ message }}");
  24.             </script>
  25.              {% set doublons = doublons|merge([message]) %}
  26.         {% endif %}
  27.     {% endfor %}
  28. {% endfor %}