File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -671,7 +671,7 @@ read any flash messages from the session:
671
671
672
672
.. code-block :: html+twig
673
673
674
- {% for flash_message in app.session.flashbag .get('notice') %}
674
+ {% for flash_message in app.session.flashBag .get('notice') %}
675
675
<div class="flash-notice">
676
676
{{ flash_message }}
677
677
</div>
Original file line number Diff line number Diff line change @@ -15,22 +15,22 @@ that a session is *always* started:
15
15
16
16
.. code-block :: html+twig
17
17
18
- {% for flashMessage in app.session.flashbag .get('notice') %}
18
+ {% for flashMessage in app.session.flashBag .get('notice') %}
19
19
<div class="flash-notice">
20
20
{{ flashMessage }}
21
21
</div>
22
22
{% endfor %}
23
23
24
24
Even if the user is not logged in and even if you haven't created any flash messages,
25
- just calling the ``get() `` (or even ``has() ``) method of the ``flashbag `` will
25
+ just calling the ``get() `` (or even ``has() ``) method of the ``flashBag `` will
26
26
start a session. This may hurt your application performance because all users will
27
27
receive a session cookie. To avoid this behavior, add a check before trying to
28
28
access the flash messages:
29
29
30
30
.. code-block :: html+twig
31
31
32
32
{% if app.request.hasPreviousSession %}
33
- {% for flashMessage in app.session.flashbag .get('notice') %}
33
+ {% for flashMessage in app.session.flashBag .get('notice') %}
34
34
<div class="flash-notice">
35
35
{{ flashMessage }}
36
36
</div>
Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ And you can display the flash message in the template like this:
331
331
332
332
.. code-block :: html+twig
333
333
334
- {% for flashMessage in app.session.flashbag .get('notice') %}
334
+ {% for flashMessage in app.session.flashBag .get('notice') %}
335
335
<div class="flash-notice">
336
336
{{ flashMessage }}
337
337
</div>
@@ -344,4 +344,4 @@ That's all there is to it and I'm not even sure you'll have spent the full
344
344
10 minutes. You were briefly introduced to bundles in the first part and
345
345
all the features you've learned about so far are part of the core FrameworkBundle.
346
346
But thanks to bundles, everything in Symfony can be extended or replaced.
347
- That's the topic of the :doc: `next part of this tutorial <the_architecture >`.
347
+ That's the topic of the :doc: `next part of this tutorial <the_architecture >`.
You can’t perform that action at this time.
0 commit comments