vendor/sulu/sulu/src/Sulu/Bundle/MarkupBundle/SuluMarkupBundle.php line 25

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\MarkupBundle;
  11. use Sulu\Bundle\MarkupBundle\DependencyInjection\CompilerPass\ParserCompilerPass;
  12. use Sulu\Bundle\MarkupBundle\DependencyInjection\CompilerPass\TagCompilerPass;
  13. use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\HttpKernel\Bundle\Bundle;
  16. /**
  17.  * Integrates markup into symfony.
  18.  *
  19.  * @final
  20.  */
  21. class SuluMarkupBundle extends Bundle
  22. {
  23.     /**
  24.      * @internal
  25.      */
  26.     public function build(ContainerBuilder $container): void
  27.     {
  28.         parent::build($container);
  29.         $container->addCompilerPass(new ParserCompilerPass());
  30.         $container->addCompilerPass(new TagCompilerPass());
  31.         $container->addCompilerPass(
  32.             new TaggedServiceCollectorCompilerPass(
  33.                 'sulu_markup.parser.delegating_html_extractor',
  34.                 'sulu_markup.parser.html_extractor'
  35.             )
  36.         );
  37.         $container->addCompilerPass(
  38.             new TaggedServiceCollectorCompilerPass(
  39.                 'sulu_markup.link_tag.provider_pool',
  40.                 'sulu.link.provider',
  41.                 0,
  42.                 'alias'
  43.             )
  44.         );
  45.     }
  46. }