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

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\ExceptionHandlerCompilerPass;
  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. class SuluCoreBundle extends Bundle
  23. {
  24.     public function build(ContainerBuilder $container)
  25.     {
  26.         parent::build($container);
  27.         $container->addCompilerPass(new RegisterContentTypesCompilerPass());
  28.         $container->addCompilerPass(new RegisterLocalizationProvidersPass());
  29.         $container->addCompilerPass(new RemoveForeignContextServicesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION1024);
  30.         $container->addCompilerPass(new ReplacersCompilerPass(__DIR__ '/DataFixtures/replacers.xml'));
  31.         $container->addCompilerPass(new ListBuilderMetadataProviderCompilerPass());
  32.         $container->addCompilerPass(
  33.             new TaggedServiceCollectorCompilerPass('sulu_core.webspace.request_analyzer''sulu.request_attributes'1)
  34.         );
  35.         $container->addCompilerPass(new CsvHandlerCompilerPass());
  36.         $container->addCompilerPass(
  37.             new TaggedServiceCollectorCompilerPass('sulu_core.webspace.url_provider''sulu.webspace.url_provider')
  38.         );
  39.         $container->addCompilerPass(
  40.             new TaggedServiceCollectorCompilerPass(
  41.                 'sulu.content.resource_locator.strategy_pool',
  42.                 'sulu.resource_locator.strategy',
  43.                 0,
  44.                 'alias'
  45.             )
  46.         );
  47.         $container->addCompilerPass(new ExceptionHandlerCompilerPass());
  48.     }
  49. }