vendor/sulu/sulu/src/Sulu/Bundle/RouteBundle/SuluRouteBundle.php line 25

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\RouteBundle;
  11. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  12. use Sulu\Bundle\RouteBundle\DependencyInjection\RouteGeneratorCompilerPass;
  13. use Sulu\Bundle\RouteBundle\Model\RouteInterface;
  14. use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
  15. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  16. use Symfony\Component\DependencyInjection\ContainerBuilder;
  17. use Symfony\Component\HttpKernel\Bundle\Bundle;
  18. /**
  19.  * Entry point of sulu-route-bundle.
  20.  */
  21. class SuluRouteBundle extends Bundle
  22. {
  23.     use PersistenceBundleTrait;
  24.     public function build(ContainerBuilder $container)
  25.     {
  26.         parent::build($container);
  27.         $container->addCompilerPass(new RouteGeneratorCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1024);
  28.         $container->addCompilerPass(
  29.             new TaggedServiceCollectorCompilerPass('sulu_route.routing.defaults_provider''sulu_route.defaults_provider')
  30.         );
  31.         $this->buildPersistence([RouteInterface::class => 'sulu.model.route.class'], $container);
  32.     }
  33. }