vendor/sulu/form-bundle/SuluFormBundle.php line 21

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\FormBundle;
  11. use Sulu\Bundle\FormBundle\DependencyInjection\CompilerPass\DynamicListBuilderCompilerPass;
  12. use Sulu\Bundle\FormBundle\DependencyInjection\CompilerPass\ListProviderCompilerPass;
  13. use Sulu\Bundle\FormBundle\DependencyInjection\CompilerPass\RemoveTaggedServiceCollectorCompilerPass;
  14. use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. class SuluFormBundle extends Bundle
  18. {
  19. public function build(ContainerBuilder $container): void
  20. {
  21. parent::build($container);
  22. $container->addCompilerPass(new ListProviderCompilerPass());
  23. $container->addCompilerPass(new DynamicListBuilderCompilerPass());
  24. $container->addCompilerPass(new RemoveTaggedServiceCollectorCompilerPass(
  25. 'sulu_form.dynamic.type',
  26. 'alias',
  27. 'sulu_form.dynamic_disabled_types'
  28. ));
  29. $container->addCompilerPass(new TaggedServiceCollectorCompilerPass(
  30. 'sulu_form.dynamic.form_field_type_pool',
  31. 'sulu_form.dynamic.type',
  32. 0,
  33. 'alias'
  34. ));
  35. $container->addCompilerPass(new TaggedServiceCollectorCompilerPass(
  36. 'sulu_form.title_provider.pool',
  37. 'sulu_form.title_provider',
  38. 0,
  39. 'alias'
  40. ));
  41. }
  42. }