File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -462,11 +462,21 @@ and can use any of these variables created by Symfony:
462
462
463
463
The ``params `` variable was introduced in Symfony 6.1.
464
464
465
- You can also use this function :
465
+ You can also use these functions :
466
466
467
467
``env(string $name) ``
468
468
Returns the value of a variable using :doc: `Environment Variable Processors <configuration/env_var_processors >`
469
469
470
+ ``service(string $alias) ``
471
+ Returns a routing condition service.
472
+ You'll have to add the ``#[AsRoutingConditionService] `` attribute or ``routing.condition_service ``
473
+ tag to your service if you want to use it in the condition.
474
+
475
+ .. versionadded :: 6.1
476
+
477
+ The ``service(string $alias) `` function and ``#[AsRoutingConditionService] `` attribute
478
+ was introduced in Symfony 6.1.
479
+
470
480
Behind the scenes, expressions are compiled down to raw PHP. Because of this,
471
481
using the ``condition `` key causes no extra overhead beyond the time it takes
472
482
for the underlying PHP to execute.
You can’t perform that action at this time.
0 commit comments