diff --git a/components/http_foundation/sessions.rst b/components/http_foundation/sessions.rst index 60b639c8dd9..7a641b3d02e 100644 --- a/components/http_foundation/sessions.rst +++ b/components/http_foundation/sessions.rst @@ -333,3 +333,12 @@ Compact method to process display all flashes at once:: echo '
'.$message.'
'; } } + +Compact method to process display all flashes at once, in Twig:: + {% for label, flashes in app.session.flashbag.all %} + {% for flash in flashes %} +
+ {{ flash }} +
+ {% endfor %} + {% endfor %}