Skip to content

Commit 090e37b

Browse files
committed
updating example to show class as service id
1 parent d2bc9aa commit 090e37b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

templating/global_variables.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ This should feel familiar, as it's the same syntax you use in service configurat
126126
twig:
127127
# ...
128128
globals:
129-
user_management: '@app.user_management'
129+
# the value is the service's id
130+
user_management: '@AppBundle\Service\UserManagement'
130131
131132
.. code-block:: xml
132133
@@ -142,7 +143,7 @@ This should feel familiar, as it's the same syntax you use in service configurat
142143
143144
<twig:config>
144145
<!-- ... -->
145-
<twig:global key="user_management">@app.user_management</twig:global>
146+
<twig:global key="user_management">@AppBundle\Service\UserManagement</twig:global>
146147
</twig:config>
147148
</container>
148149
@@ -152,6 +153,6 @@ This should feel familiar, as it's the same syntax you use in service configurat
152153
$container->loadFromExtension('twig', array(
153154
// ...
154155
'globals' => array(
155-
'user_management' => '@app.user_management',
156+
'user_management' => '@AppBundle\Service\UserManagement',
156157
),
157158
));

0 commit comments

Comments
 (0)