vendor/sonata-project/admin-bundle/src/SonataAdminBundle.php line 31

Open in your IDE?
  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\AdminBundle;
  12. use Sonata\AdminBundle\DependencyInjection\Compiler\AddAuditReadersCompilerPass;
  13. use Sonata\AdminBundle\DependencyInjection\Compiler\AddDependencyCallsCompilerPass;
  14. use Sonata\AdminBundle\DependencyInjection\Compiler\AddFilterTypeCompilerPass;
  15. use Sonata\AdminBundle\DependencyInjection\Compiler\AdminAddInitializeCallCompilerPass;
  16. use Sonata\AdminBundle\DependencyInjection\Compiler\AdminMakerCompilerPass;
  17. use Sonata\AdminBundle\DependencyInjection\Compiler\AdminSearchCompilerPass;
  18. use Sonata\AdminBundle\DependencyInjection\Compiler\ExtensionCompilerPass;
  19. use Sonata\AdminBundle\DependencyInjection\Compiler\GlobalVariablesCompilerPass;
  20. use Sonata\AdminBundle\DependencyInjection\Compiler\ModelManagerCompilerPass;
  21. use Sonata\AdminBundle\DependencyInjection\Compiler\ObjectAclManipulatorCompilerPass;
  22. use Sonata\AdminBundle\DependencyInjection\Compiler\TwigStringExtensionCompilerPass;
  23. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  24. use Symfony\Component\DependencyInjection\ContainerBuilder;
  25. use Symfony\Component\HttpKernel\Bundle\Bundle;
  26. final class SonataAdminBundle extends Bundle
  27. {
  28.     public function build(ContainerBuilder $container): void
  29.     {
  30.         $container->addCompilerPass(new AddDependencyCallsCompilerPass());
  31.         $container->addCompilerPass(new AddFilterTypeCompilerPass());
  32.         $container->addCompilerPass(new AdminSearchCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -1);
  33.         $container->addCompilerPass(new ExtensionCompilerPass());
  34.         $container->addCompilerPass(new GlobalVariablesCompilerPass());
  35.         $container->addCompilerPass(new ModelManagerCompilerPass());
  36.         $container->addCompilerPass(new ObjectAclManipulatorCompilerPass());
  37.         $container->addCompilerPass(new TwigStringExtensionCompilerPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION1);
  38.         $container->addCompilerPass(new AdminMakerCompilerPass());
  39.         $container->addCompilerPass(new AddAuditReadersCompilerPass());
  40.         $container->addCompilerPass(new AdminAddInitializeCallCompilerPass(), PassConfig::TYPE_BEFORE_REMOVING, -100);
  41.     }
  42. }