File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ class AppExtension extends AbstractExtension
29
29
30
30
public function __construct (string $ locales )
31
31
{
32
+ // The $locales argument is injected thanks to the service container.
33
+ // See https://symfony.com/doc/current/service_container.html#binding-arguments-by-name-or-type
32
34
$ localeCodes = explode ('| ' , $ locales );
33
35
sort ($ localeCodes );
34
36
$ this ->localeCodes = $ localeCodes ;
Original file line number Diff line number Diff line change 21
21
* CAUTION: this is an extremely advanced Twig extension. It's used to get the
22
22
* source code of the controller and the template used to render the current
23
23
* page. If you are starting with Symfony, don't look at this code and consider
24
- * studying instead the code of the src/App/ Twig/AppExtension.php extension.
24
+ * studying instead the code of the src/Twig/AppExtension.php extension.
25
25
*
26
26
* @author Ryan Weaver <weaverryan@gmail.com>
27
27
* @author Javier Eguiluz <javier.eguiluz@gmail.com>
You can’t perform that action at this time.
0 commit comments