Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,14 @@ read any flash messages from the session:
<!-- app/Resources/views/base.html.php -->

// you can read and display just one flash message type...
<?php foreach ($view['session']->getFlash('notice') as $message): ?>
<?php foreach ($view['session']->getFlashBag()->get('notice') as $message): ?>
<div class="flash-notice">
<?php echo $message ?>
</div>
<?php endforeach ?>

// ...or you can read and display every flash message available
<?php foreach ($view['session']->getFlashes() as $type => $flash_messages): ?>
<?php foreach ($view['session']->getFlashBag()->all() as $type => $flash_messages): ?>
<?php foreach ($flash_messages as $flash_message): ?>
<div class="flash-<?php echo $type ?>">
<?php echo $message ?>
Expand Down