vendor/sonata-project/page-bundle/src/SonataPageBundle.php line 27

  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the Sonata Project package.
  5.  *
  6.  * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace Sonata\PageBundle;
  12. use Sonata\PageBundle\DependencyInjection\Compiler\CmfRouterCompilerPass;
  13. use Sonata\PageBundle\DependencyInjection\Compiler\GlobalVariablesCompilerPass;
  14. use Sonata\PageBundle\DependencyInjection\Compiler\PageServiceCompilerPass;
  15. use Sonata\PageBundle\DependencyInjection\Compiler\TwigStringExtensionCompilerPass;
  16. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  17. use Symfony\Component\DependencyInjection\ContainerBuilder;
  18. use Symfony\Component\HttpKernel\Bundle\Bundle;
  19. /**
  20.  * @author Thomas Rabaix <thomas.rabaix@sonata-project.org>
  21.  */
  22. final class SonataPageBundle extends Bundle
  23. {
  24.     public function build(ContainerBuilder $container): void
  25.     {
  26.         $container->addCompilerPass(new GlobalVariablesCompilerPass());
  27.         $container->addCompilerPass(new PageServiceCompilerPass());
  28.         $container->addCompilerPass(new CmfRouterCompilerPass());
  29.         $container->addCompilerPass(new TwigStringExtensionCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION1);
  30.     }
  31. }