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

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\ListBuilderMetadataProviderCompilerPass;
  13. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterContentTypesCompilerPass;
  14. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\RegisterLocalizationProvidersPass;
  15. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\RemoveForeignContextServicesPass;
  16. use Sulu\Bundle\CoreBundle\DependencyInjection\Compiler\ReplacersCompilerPass;
  17. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  18. use Symfony\Component\DependencyInjection\ContainerBuilder;
  19. use Symfony\Component\HttpKernel\Bundle\Bundle;
  20. /**
  21. * @final
  22. */
  23. class SuluCoreBundle extends Bundle
  24. {
  25. /**
  26. * @internal
  27. */
  28. public function build(ContainerBuilder $container): void
  29. {
  30. parent::build($container);
  31. $container->addCompilerPass(new RegisterContentTypesCompilerPass());
  32. $container->addCompilerPass(new RegisterLocalizationProvidersPass());
  33. $container->addCompilerPass(new RemoveForeignContextServicesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 99);
  34. $container->addCompilerPass(new ReplacersCompilerPass(__DIR__ . '/DataFixtures/replacers.xml'));
  35. $container->addCompilerPass(new ListBuilderMetadataProviderCompilerPass());
  36. $container->addCompilerPass(new CsvHandlerCompilerPass());
  37. }
  38. }