|
7 | 7 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
8 | 8 | use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
9 | 9 | use Symfony\Component\Config\FileLocator;
|
10 |
| -use Symfony\Component\Config\Definition\Processor; |
11 | 10 | use Symfony\Component\DependencyInjection\Definition;
|
12 | 11 | use Symfony\Component\DependencyInjection\Reference;
|
13 | 12 |
|
@@ -38,9 +37,7 @@ public function load(array $configs, ContainerBuilder $container)
|
38 | 37 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
39 | 38 | $loader->load('services.xml');
|
40 | 39 |
|
41 |
| - $processor = new Processor(); |
42 |
| - $configuration = new Configuration($this->getAlias()); |
43 |
| - $config = $processor->processConfiguration($configuration, $configs); |
| 40 | + $config = $this->processConfiguration($this->getConfiguration($configs, $container), $configs); |
44 | 41 |
|
45 | 42 | $container->setParameter('admingenerator.overwrite_if_exists', $config['overwrite_if_exists']);
|
46 | 43 | $container->setParameter('admingenerator.base_admin_template', $config['base_admin_template']);
|
@@ -165,6 +162,17 @@ protected function addCacheProviderToGenerator($cacheProviderServiceName, Defini
|
165 | 162 | ));
|
166 | 163 | }
|
167 | 164 |
|
| 165 | + /** |
| 166 | + * @return \Admingenerator\GeneratorBundle\DependencyInjection\Configuration |
| 167 | + */ |
| 168 | + public function getConfiguration(array $config, ContainerBuilder $container) |
| 169 | + { |
| 170 | + return new Configuration($this->getAlias()); |
| 171 | + } |
| 172 | + |
| 173 | + /** |
| 174 | + * @return string |
| 175 | + */ |
168 | 176 | public function getAlias()
|
169 | 177 | {
|
170 | 178 | return 'admingenerator_generator';
|
|
0 commit comments