Skip to content

Commit c8c9f17

Browse files
committed
minor #6794 Added a new section to the page templating/global_vars using a EVListener (piet, Piet Bijl)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #6794). Discussion ---------- Added a new section to the page templating/global_vars using a EVListener Added another option for injecting variables into templates through the use of a event listener, also added a DC/removal notice on twigs getGlobals Commits ------- ef1c2fd Added a new section to the page templating/global_vars using a EVListener
2 parents b265132 + ef1c2fd commit c8c9f17

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

templating/global_variables.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,4 @@ This should feel familiar, as it's the same syntax you use in service configurat
124124
'globals' => array(
125125
'user_management' => '@app.user_management',
126126
),
127-
));
128-
129-
Using a Twig Extension
130-
----------------------
131-
132-
If the global variable you want to set is more complicated - say an object -
133-
then you won't be able to use the above method. Instead, you'll need to create
134-
a :ref:`Twig Extension <reference-dic-tags-twig-extension>` and return the
135-
global variable as one of the entries in the ``getGlobals`` method.
127+
));

0 commit comments

Comments
 (0)