vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/SuluWebsiteBundle.php line 23

  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. class SuluWebsiteBundle extends Bundle
  20. {
  21.     use PersistenceBundleTrait;
  22.     public function build(ContainerBuilder $container)
  23.     {
  24.         parent::build($container);
  25.         $container->addCompilerPass(new SuluVersionPass());
  26.         $container->addCompilerPass(new DeregisterDefaultRouteListenerCompilerPass());
  27.         $container->addCompilerPass(
  28.             new RouteDefaultOptionsCompilerPass('sulu_website.provider.content'7)
  29.         );
  30.         $container->addCompilerPass(
  31.             new TaggedServiceCollectorCompilerPass(
  32.                 'sulu_website.reference_store_pool',
  33.                 'sulu_website.reference_store',
  34.                 0,
  35.                 'alias'
  36.             )
  37.         );
  38.         $this->buildPersistence(
  39.             [
  40.                 AnalyticsInterface::class => 'sulu.model.analytics.class',
  41.             ],
  42.             $container
  43.         );
  44.     }
  45. }