vendor/knplabs/knp-menu-bundle/src/KnpMenuBundle.php line 14

Open in your IDE?
  1. <?php
  2. namespace Knp\Bundle\MenuBundle;
  3. use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\AddExtensionsPass;
  4. use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\AddProvidersPass;
  5. use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\AddRenderersPass;
  6. use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\AddVotersPass;
  7. use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\MenuBuilderPass;
  8. use Knp\Bundle\MenuBundle\DependencyInjection\Compiler\RegisterMenusPass;
  9. use Symfony\Component\DependencyInjection\ContainerBuilder;
  10. use Symfony\Component\HttpKernel\Bundle\Bundle;
  11. final class KnpMenuBundle extends Bundle
  12. {
  13. public function build(ContainerBuilder $container): void
  14. {
  15. parent::build($container);
  16. $container->addCompilerPass(new RegisterMenusPass());
  17. $container->addCompilerPass(new MenuBuilderPass());
  18. $container->addCompilerPass(new AddExtensionsPass());
  19. $container->addCompilerPass(new AddProvidersPass());
  20. $container->addCompilerPass(new AddRenderersPass());
  21. $container->addCompilerPass(new AddVotersPass());
  22. }
  23. public function getPath(): string
  24. {
  25. return \dirname(__DIR__);
  26. }
  27. }