vendor/sulu/sulu/src/Sulu/Bundle/CustomUrlBundle/SuluCustomUrlBundle.php line 24

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\CustomUrlBundle;
  11. use Sulu\Component\Route\RouteDefaultOptionsCompilerPass;
  12. use Symfony\Cmf\Component\Routing\DependencyInjection\Compiler\RegisterRouteEnhancersPass;
  13. use Symfony\Component\DependencyInjection\ContainerBuilder;
  14. use Symfony\Component\HttpKernel\Bundle\Bundle;
  15. /**
  16. * Integrates custom-urls into sulu.
  17. *
  18. * @final
  19. */
  20. class SuluCustomUrlBundle extends Bundle
  21. {
  22. /**
  23. * @internal
  24. */
  25. public function build(ContainerBuilder $container): void
  26. {
  27. parent::build($container);
  28. $container->addCompilerPass(
  29. new RouteDefaultOptionsCompilerPass('sulu_custom_urls.routing.provider', 3)
  30. );
  31. $container->addCompilerPass(
  32. new RegisterRouteEnhancersPass('sulu_custom_urls.routing.router', 'sulu_custom_urls.route_enhancer')
  33. );
  34. }
  35. }