From 8d68745378b2a8b4cb094ae62ae80dc05b9fa44c Mon Sep 17 00:00:00 2001 From: Antoine Makdessi Date: Thu, 16 Dec 2021 12:41:30 +0100 Subject: [PATCH] Add some doc for Twig Extension --- src/Twig/AppExtension.php | 2 ++ src/Twig/SourceCodeExtension.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Twig/AppExtension.php b/src/Twig/AppExtension.php index 4856bd846..522b49a5d 100644 --- a/src/Twig/AppExtension.php +++ b/src/Twig/AppExtension.php @@ -29,6 +29,8 @@ class AppExtension extends AbstractExtension public function __construct(string $locales) { + // The $locales argument is injected thanks to the service container. + // See https://symfony.com/doc/current/service_container.html#binding-arguments-by-name-or-type $localeCodes = explode('|', $locales); sort($localeCodes); $this->localeCodes = $localeCodes; diff --git a/src/Twig/SourceCodeExtension.php b/src/Twig/SourceCodeExtension.php index 4034fdc2f..87f42e8eb 100644 --- a/src/Twig/SourceCodeExtension.php +++ b/src/Twig/SourceCodeExtension.php @@ -21,7 +21,7 @@ * CAUTION: this is an extremely advanced Twig extension. It's used to get the * source code of the controller and the template used to render the current * page. If you are starting with Symfony, don't look at this code and consider - * studying instead the code of the src/App/Twig/AppExtension.php extension. + * studying instead the code of the src/Twig/AppExtension.php extension. * * @author Ryan Weaver * @author Javier Eguiluz