vendor/shopware/core/System/System.php line 16

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. /**
  11.  * @internal
  12.  */
  13. class System extends Bundle
  14. {
  15.     public function getTemplatePriority(): int
  16.     {
  17.         return -1;
  18.     }
  19.     /**
  20.      * {@inheritdoc}
  21.      */
  22.     public function build(ContainerBuilder $container): void
  23.     {
  24.         parent::build($container);
  25.         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ '/DependencyInjection/'));
  26.         $loader->load('sales_channel.xml');
  27.         $loader->load('country.xml');
  28.         $loader->load('currency.xml');
  29.         $loader->load('custom_entity.xml');
  30.         $loader->load('locale.xml');
  31.         $loader->load('snippet.xml');
  32.         $loader->load('salutation.xml');
  33.         $loader->load('tax.xml');
  34.         $loader->load('unit.xml');
  35.         $loader->load('user.xml');
  36.         $loader->load('integration.xml');
  37.         $loader->load('state_machine.xml');
  38.         $loader->load('configuration.xml');
  39.         $loader->load('number_range.xml');
  40.         $loader->load('tag.xml');
  41.         $container->addCompilerPass(new SalesChannelEntityCompilerPass());
  42.         $container->addCompilerPass(new RedisNumberRangeIncrementerCompilerPass());
  43.     }
  44.     public function boot(): void
  45.     {
  46.         parent::boot();
  47.         $this->container->get(CustomEntityRegistrar::class)->register();
  48.     }
  49. }