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

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