vendor/babdev/pagerfanta-bundle/src/BabDevPagerfantaBundle.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace BabDev\PagerfantaBundle;
  3. use BabDev\PagerfantaBundle\DependencyInjection\BabDevPagerfantaExtension;
  4. use BabDev\PagerfantaBundle\DependencyInjection\CompilerPass\RegisterPagerfantaViewsPass;
  5. use BabDev\PagerfantaBundle\DependencyInjection\CompilerPass\RegisterTwigUndefinedCallablePass;
  6. use Symfony\Component\DependencyInjection\ContainerBuilder;
  7. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  8. use Symfony\Component\HttpKernel\Bundle\Bundle;
  9. final class BabDevPagerfantaBundle extends Bundle
  10. {
  11. public function build(ContainerBuilder $container): void
  12. {
  13. parent::build($container);
  14. $container->addCompilerPass(new RegisterPagerfantaViewsPass());
  15. $container->addCompilerPass(new RegisterTwigUndefinedCallablePass());
  16. }
  17. public function getContainerExtension(): ?ExtensionInterface
  18. {
  19. if (null === $this->extension) {
  20. $this->extension = new BabDevPagerfantaExtension();
  21. }
  22. return $this->extension ?: null;
  23. }
  24. public function getPath(): string
  25. {
  26. return \dirname(__DIR__);
  27. }
  28. }