Skip to content

Commit 8e8d63c

Browse files
committed
minor #1290 Add some doc for Twig Extension (Antoine Makdessi)
This PR was merged into the main branch. Discussion ---------- Add some doc for Twig Extension While reading the doc and opening symfony/symfony-docs#16292 as well Commits ------- 8d68745 Add some doc for Twig Extension
2 parents e202561 + 8d68745 commit 8e8d63c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Twig/AppExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class AppExtension extends AbstractExtension
2929

3030
public function __construct(string $locales)
3131
{
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
3234
$localeCodes = explode('|', $locales);
3335
sort($localeCodes);
3436
$this->localeCodes = $localeCodes;

src/Twig/SourceCodeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* CAUTION: this is an extremely advanced Twig extension. It's used to get the
2222
* source code of the controller and the template used to render the current
2323
* 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.
2525
*
2626
* @author Ryan Weaver <weaverryan@gmail.com>
2727
* @author Javier Eguiluz <javier.eguiluz@gmail.com>

0 commit comments

Comments
 (0)