File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -457,14 +457,23 @@ read any flash messages from the session using ``app.flashes()``:
457457
458458 {# templates/base.html.twig #}
459459
460- {# you can read and display just one flash message type... #}
460+ {# read and display just one flash message type #}
461461 {% for message in app.flashes('notice') %}
462462 <div class="flash-notice">
463463 {{ message }}
464464 </div>
465465 {% endfor %}
466466
467- {# ...or you can read and display every flash message available #}
467+ {# read and display several types of flash messages #}
468+ {% for label, messages in app.flashes(['success', 'warning']) %}
469+ {% for message in messages %}
470+ <div class="flash-{{ label }}">
471+ {{ message }}
472+ </div>
473+ {% endfor %}
474+ {% endfor %}
475+
476+ {# read and display all flash messages #}
468477 {% for label, messages in app.flashes %}
469478 {% for message in messages %}
470479 <div class="flash-{{ label }}">
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ Don't forget to update the ``example.com/src/app.php`` file accordingly::
138138
139139 $routes->add('leap_year', new Routing\Route('/is_leap_year/{year}', [
140140 'year' => null,
141- '_controller' => 'Calendar\Controller\LeapYearController::indexAction ',
141+ '_controller' => 'Calendar\Controller\LeapYearController::index ',
142142 ]));
143143
144144To sum up, here is the new file layout:
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ a traditional HTML form that submits to ``/login``:
122122
123123 use App\Entity\User;
124124 use Doctrine\ORM\EntityManagerInterface;
125+ use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
125126 use Symfony\Component\HttpFoundation\RedirectResponse;
126127 use Symfony\Component\HttpFoundation\Request;
127128 use Symfony\Component\Routing\RouterInterface;
You can’t perform that action at this time.
0 commit comments