Skip to content

Add some doc for Twig Extension #1290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Twig/AppExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/SourceCodeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
* @author Javier Eguiluz <[email protected]>
Expand Down