@@ 15-35 (lines=21) @@ | ||
12 | * |
|
13 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
|
14 | */ |
|
15 | class VictoireSeoExtension extends Extension |
|
16 | { |
|
17 | /** |
|
18 | * Load configuration. |
|
19 | * |
|
20 | * @param array $configs |
|
21 | * @param ContainerBuilder $container |
|
22 | */ |
|
23 | public function load(array $configs, ContainerBuilder $container) |
|
24 | { |
|
25 | $configuration = new Configuration(); |
|
26 | $config = $this->processConfiguration($configuration, $configs); |
|
27 | ||
28 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
29 | $loader->load('services.yml'); |
|
30 | ||
31 | $container->setParameter( |
|
32 | 'victoire_seo.analytics', $config['analytics'] |
|
33 | ); |
|
34 | } |
|
35 | } |
|
36 |
@@ 15-32 (lines=18) @@ | ||
12 | * |
|
13 | * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} |
|
14 | */ |
|
15 | class VictoireTwigExtension extends Extension |
|
16 | { |
|
17 | /** |
|
18 | * {@inheritdoc} |
|
19 | */ |
|
20 | public function load(array $configs, ContainerBuilder $container) |
|
21 | { |
|
22 | $configuration = new Configuration(); |
|
23 | $config = $this->processConfiguration($configuration, $configs); |
|
24 | ||
25 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
26 | $loader->load('services.xml'); |
|
27 | ||
28 | $container->setParameter( |
|
29 | 'victoire_twig.responsive', $config['responsive'] |
|
30 | ); |
|
31 | } |
|
32 | } |
|
33 |