File tree Expand file tree Collapse file tree
templates/twig-component/src/DependencyInjection Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3+ declare (strict_types=1 );
4+
35namespace Html \TwigComponentBundle \DependencyInjection ;
46
5- use Symfony \Component \Config \ FileLocator ;
6- use Symfony \ Component \ DependencyInjection \ ContainerBuilder ;
7- use Symfony \ Component \ DependencyInjection \ Extension \Extension ;
8- use Symfony \ Component \ DependencyInjection \ Loader \ PhpFileLoader ;
7+ use Symfony \Component \DependencyInjection \{
8+ ContainerBuilder ,
9+ Extension \Extension ,
10+ } ;
911
10- /**
11- * HtmlTwigComponentExtension - Auto-registers Twig Components
12- *
13- * Automatically discovers and registers all Twig Component classes from the bundle,
14- * enabling auto-configuration of components with #[AsTwigComponent] attribute.
15- *
16- * @author vardumper <info@erikpoehler.com>
17- * @package Html\TwigComponentBundle\DependencyInjection
18- */
1912class HtmlTwigComponentExtension extends Extension
2013{
2114 public function load (array $ configs , ContainerBuilder $ container ): void
@@ -29,12 +22,12 @@ public function getAlias(): string
2922
3023 public function prepend (ContainerBuilder $ container ): void
3124 {
32- $ bundlePath = dirname (__DIR__ ); // Gets the bundle's root directory
33-
25+ $ bundlePath = \ dirname (__DIR__ );
26+
3427 $ container ->prependExtensionConfig ('twig ' , [
3528 'paths ' => [
36- $ bundlePath . '/Resources ' => 'HtmlTwigComponent '
37- ]
29+ $ bundlePath . '/Resources ' => 'HtmlTwigComponent ' ,
30+ ],
3831 ]);
3932 }
4033}
You can’t perform that action at this time.
0 commit comments