vendor/netzmacht/contao-toolkit/src/Bundle/NetzmachtContaoToolkitBundle.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Netzmacht\Contao\Toolkit\Bundle;
  4. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\AddTaggedServicesAsArgumentPass;
  5. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\ComponentDecoratorPass;
  6. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\FosCacheResponseTaggerPass;
  7. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\RegisterContaoModelPass;
  8. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\RepositoriesPass;
  9. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\TemplateRendererPass;
  10. use Netzmacht\Contao\Toolkit\Bundle\DependencyInjection\Compiler\TemplatingPass;
  11. use Symfony\Component\DependencyInjection\ContainerBuilder;
  12. use Symfony\Component\HttpKernel\Bundle\Bundle;
  13. /** @psalm-suppress DeprecatedClass */
  14. final class NetzmachtContaoToolkitBundle extends Bundle
  15. {
  16.     public function build(ContainerBuilder $container): void
  17.     {
  18.         parent::build($container);
  19.         $container->addCompilerPass(new RepositoriesPass());
  20.         $container->addCompilerPass(new FosCacheResponseTaggerPass());
  21.         $container->addCompilerPass(
  22.             new ComponentDecoratorPass(
  23.                 'netzmacht.contao_toolkit.component.frontend_module',
  24.                 0,
  25.                 'netzmacht.contao_toolkit.component.frontend_module_factory'
  26.             )
  27.         );
  28.         $container->addCompilerPass(
  29.             new ComponentDecoratorPass(
  30.                 'netzmacht.contao_toolkit.component.content_element',
  31.                 1,
  32.                 'netzmacht.contao_toolkit.component.content_element_factory'
  33.             )
  34.         );
  35.         $container->addCompilerPass(
  36.             new AddTaggedServicesAsArgumentPass(
  37.                 'netzmacht.contao_toolkit.component.content_element_factory',
  38.                 'netzmacht.contao_toolkit.component.content_element_factory'
  39.             )
  40.         );
  41.         $container->addCompilerPass(
  42.             new AddTaggedServicesAsArgumentPass(
  43.                 'netzmacht.contao_toolkit.component.frontend_module_factory',
  44.                 'netzmacht.contao_toolkit.component.frontend_module_factory'
  45.             )
  46.         );
  47.         $container->addCompilerPass(
  48.             new AddTaggedServicesAsArgumentPass(
  49.                 'netzmacht.contao_toolkit.listeners.create_formatter_subscriber',
  50.                 'netzmacht.contao_toolkit.dca.formatter'
  51.             )
  52.         );
  53.         $container->addCompilerPass(
  54.             new AddTaggedServicesAsArgumentPass(
  55.                 'netzmacht.contao_toolkit.listeners.create_formatter_subscriber',
  56.                 'netzmacht.contao_toolkit.dca.formatter.pre_filter',
  57.                 1
  58.             )
  59.         );
  60.         $container->addCompilerPass(
  61.             new AddTaggedServicesAsArgumentPass(
  62.                 'netzmacht.contao_toolkit.listeners.create_formatter_subscriber',
  63.                 'netzmacht.contao_toolkit.dca.formatter.post_filter',
  64.                 2
  65.             )
  66.         );
  67.         $container->addCompilerPass(new RegisterContaoModelPass());
  68.         $container->addCompilerPass(new TemplateRendererPass());
  69.         $container->addCompilerPass(new TemplatingPass());
  70.     }
  71. }