vendor/sulu/sulu/src/Sulu/Bundle/CoreBundle/SuluCoreBundle.php line 29

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of Sulu.
  4.  *
  5.  * (c) Sulu GmbH
  6.  *
  7.  * This source file is subject to the MIT license that is bundled
  8.  * with this source code in the file LICENSE.
  9.  */
  10. namespace Sulu\Bundle\CoreBundle;
  11. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\CsvHandlerCompilerPass;
  12. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\JmsObjectConstructorCompilerPass;
  13. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\ListBuilderMetadataProviderCompilerPass;
  14. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterContentTypesCompilerPass;
  15. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterLocalizationProvidersPass;
  16. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\RemoveForeignContextServicesPass;
  17. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\ReplacersCompilerPass;
  18. use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
  19. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  20. use Symfony\Component\DependencyInjection\ContainerBuilder;
  21. use Symfony\Component\HttpKernel\Bundle\Bundle;
  22. /**
  23.  * @final
  24.  */
  25. class SuluCoreBundle extends Bundle
  26. {
  27.     /**
  28.      * @internal
  29.      */
  30.     public function build(ContainerBuilder $container): void
  31.     {
  32.         parent::build($container);
  33.         $container->addCompilerPass(new RegisterContentTypesCompilerPass());
  34.         $container->addCompilerPass(new RegisterLocalizationProvidersPass());
  35.         $container->addCompilerPass(new RemoveForeignContextServicesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION99);
  36.         $container->addCompilerPass(new ReplacersCompilerPass(__DIR__ '/DataFixtures/replacers.xml'));
  37.         $container->addCompilerPass(new ListBuilderMetadataProviderCompilerPass());
  38.         $container->addCompilerPass(
  39.             new TaggedServiceCollectorCompilerPass('sulu_core.webspace.request_analyzer''sulu.request_attributes'1)
  40.         );
  41.         $container->addCompilerPass(new CsvHandlerCompilerPass());
  42.         $container->addCompilerPass(
  43.             new TaggedServiceCollectorCompilerPass('sulu_core.webspace.url_provider''sulu.webspace.url_provider')
  44.         );
  45.         $container->addCompilerPass(
  46.             new TaggedServiceCollectorCompilerPass(
  47.                 'sulu.content.resource_locator.strategy_pool',
  48.                 'sulu.resource_locator.strategy',
  49.                 0,
  50.                 'alias'
  51.             )
  52.         );
  53.         $container->addCompilerPass(new JmsObjectConstructorCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1024);
  54.     }
  55. }