Skip to content

Commit 6c02ec0

Browse files
committed
minor #16518 [DependencyInjection] Add documentation for the env DI expression function (jvasseur)
This PR was merged into the 6.1 branch. Discussion ---------- [DependencyInjection] Add documentation for the env DI expression function Doc PR for symfony/symfony#45450 Commits ------- bcbf1f3 Add documentation for the env DI expresion function
2 parents 89b1743 + bcbf1f3 commit 6c02ec0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

service_container/expression_language.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ to another service: ``App\Mailer``. One way to do this is with an expression:
7373
7474
To learn more about the expression language syntax, see :doc:`/components/expression_language/syntax`.
7575

76-
In this context, you have access to 2 functions:
76+
In this context, you have access to 3 functions:
7777

7878
``service``
7979
Returns a given service (see the example above).
8080
``parameter``
8181
Returns a specific parameter value (syntax is like ``service``).
82+
``env``
83+
Returns the value of an env variable.
8284

8385
You also have access to the :class:`Symfony\\Component\\DependencyInjection\\Container`
8486
via a ``container`` variable. Here's another example:

0 commit comments

Comments
 (0)