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.             <!-- Toastr CSS -->
  6.             <link href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" rel="stylesheet" />
  7.             <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"></script>
  8.             <script>
  9.                 toastr.options = {
  10.                     "closeButton": true,
  11.                     "debug": false,
  12.                     "newestOnTop": false,
  13.                     "progressBar": true,
  14.                     "positionClass": "toast-bottom-right",
  15.                     "preventDuplicates": false,
  16.                     "onclick": null,
  17.                     "showDuration": "300",
  18.                     "hideDuration": "1000",
  19.                     "timeOut": "5000",
  20.                     "extendedTimeOut": "4000",
  21.                     "showEasing": "swing",
  22.                     "hideEasing": "linear",
  23.                     "showMethod": "fadeIn",
  24.                     "hideMethod": "fadeOut"
  25.                 };
  26.                 toastr.{{ label }}("{{ message }}");
  27.             </script>
  28.              {% set doublons = doublons|merge([message]) %}
  29.         {% endif %}
  30.     {% endfor %}
  31. {% endfor %}