vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/SuluWebsiteBundle.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\WebsiteBundle;
  11. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  12. use Sulu\Bundle\WebsiteBundle\DependencyInjection\Compiler\DeregisterDefaultRouteListenerCompilerPass;
  13. use Sulu\Bundle\WebsiteBundle\Entity\AnalyticsInterface;
  14. use Sulu\Component\Route\RouteDefaultOptionsCompilerPass;
  15. use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
  16. use Sulu\Component\Util\SuluVersionPass;
  17. use Symfony\Component\DependencyInjection\ContainerBuilder;
  18. use Symfony\Component\HttpKernel\Bundle\Bundle;
  19. /**
  20. * @final
  21. */
  22. class SuluWebsiteBundle extends Bundle
  23. {
  24. use PersistenceBundleTrait;
  25. /**
  26. * @internal
  27. */
  28. public function build(ContainerBuilder $container): void
  29. {
  30. parent::build($container);
  31. $container->addCompilerPass(new SuluVersionPass());
  32. $container->addCompilerPass(new DeregisterDefaultRouteListenerCompilerPass());
  33. $container->addCompilerPass(
  34. new RouteDefaultOptionsCompilerPass('sulu_website.provider.content', 7)
  35. );
  36. $container->addCompilerPass(
  37. new TaggedServiceCollectorCompilerPass(
  38. 'sulu_website.reference_store_pool',
  39. 'sulu_website.reference_store',
  40. 0,
  41. 'alias'
  42. )
  43. );
  44. $this->buildPersistence(
  45. [
  46. AnalyticsInterface::class => 'sulu.model.analytics.class',
  47. ],
  48. $container
  49. );
  50. }
  51. }