1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Setono\SyliusLogEntryPlugin\DependencyInjection; |
||
6 | |||
7 | use Exception; |
||
8 | use Sylius\Bundle\ResourceBundle\DependencyInjection\Extension\AbstractResourceExtension; |
||
9 | use Symfony\Component\Config\FileLocator; |
||
10 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
11 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
||
12 | |||
13 | final class SetonoSyliusLogEntryExtension extends AbstractResourceExtension |
||
14 | { |
||
15 | /** |
||
16 | * @throws Exception |
||
17 | */ |
||
18 | public function load(array $config, ContainerBuilder $container): void |
||
19 | { |
||
20 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
21 | |||
22 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
||
23 | $loader->load('services.xml'); |
||
24 | |||
25 | // Notice that we give an empty resources array here, but this ensures that the parameters are set in the AbstractResourceExtension |
||
26 | // which in turn will run the compiler pass Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass |
||
27 | $this->registerResources('setono_sylius_returns', $config['driver'], [], $container); |
||
28 | } |
||
29 | } |
||
30 |