src/Administration/Administration.php line 17

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Administration;
  3. use Shopware\Administration\DependencyInjection\AdministrationMigrationCompilerPass;
  4. use Shopware\Core\Framework\Bundle;
  5. use Shopware\Core\Framework\Log\Package;
  6. use Symfony\Component\Config\FileLocator;
  7. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  8. use Symfony\Component\DependencyInjection\ContainerBuilder;
  9. use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
  10. /**
  11.  * @internal
  12.  */
  13. #[Package('administration')]
  14. class Administration extends Bundle
  15. {
  16.     public function getTemplatePriority(): int
  17.     {
  18.         return -1;
  19.     }
  20.     public function build(ContainerBuilder $container): void
  21.     {
  22.         parent::build($container);
  23.         $loader = new XmlFileLoader($container, new FileLocator(__DIR__ '/DependencyInjection/'));
  24.         $loader->load('services.xml');
  25.         $container->addCompilerPass(new AdministrationMigrationCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION0);
  26.     }
  27. }