| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Setono\SyliusLagersystemPlugin\DependencyInjection; |
||
| 6 | |||
| 7 | use function Safe\sprintf; |
||
| 8 | use Symfony\Component\Config\FileLocator; |
||
| 9 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
| 10 | use Symfony\Component\DependencyInjection\Extension\Extension; |
||
| 11 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; |
||
| 12 | |||
| 13 | final class SetonoSyliusLagersystemExtension extends Extension |
||
| 14 | { |
||
| 15 | public function load(array $config, ContainerBuilder $container): void |
||
| 16 | { |
||
| 17 | $config = $this->processConfiguration($this->getConfiguration([], $container), $config); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 18 | $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
||
| 19 | |||
| 20 | foreach ($config['view_classes'] as $view => $class) { |
||
| 21 | $container->setParameter(sprintf('setono_sylius_lagersystem.view.%s.class', $view), $class); |
||
| 22 | } |
||
| 23 | |||
| 24 | $loader->load('services.xml'); |
||
| 25 | } |
||
| 26 | } |
||
| 27 |