vendor/shopware/platform/src/Core/System/System.php line 13

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System;
  3. use Shopware\Core\Framework\Bundle;
  4. use Shopware\Core\System\CustomEntity\CustomEntityRegistrar;
  5. use Shopware\Core\System\DependencyInjection\CompilerPass\RedisNumberRangeIncrementerCompilerPass;
  6. use Shopware\Core\System\DependencyInjection\CompilerPass\SalesChannelEntityCompilerPass;
  7. use Symfony\Component\Config\FileLocator;
  8. use Symfony\Component\DependencyInjection\ContainerBuilder;
  9. use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
  10. class System extends Bundle
  11. {
  12.     /**
  13.      * {@inheritdoc}
  14.      */
  15.     public function build(ContainerBuilder $container): void
  16.     {
  17.         parent::build($container);
  18.         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ '/DependencyInjection/'));
  19.         $loader->load('sales_channel.xml');
  20.         $loader->load('country.xml');
  21.         $loader->load('currency.xml');
  22.         $loader->load('custom_entity.xml');
  23.         $loader->load('locale.xml');
  24.         $loader->load('snippet.xml');
  25.         $loader->load('salutation.xml');
  26.         $loader->load('tax.xml');
  27.         $loader->load('unit.xml');
  28.         $loader->load('user.xml');
  29.         $loader->load('integration.xml');
  30.         $loader->load('state_machine.xml');
  31.         $loader->load('configuration.xml');
  32.         $loader->load('number_range.xml');
  33.         $loader->load('tag.xml');
  34.         $container->addCompilerPass(new SalesChannelEntityCompilerPass());
  35.         $container->addCompilerPass(new RedisNumberRangeIncrementerCompilerPass());
  36.     }
  37.     public function boot(): void
  38.     {
  39.         parent::boot();
  40.         $this->container->get(CustomEntityRegistrar::class)->register();
  41.     }
  42. }