vendor/sulu/sulu/src/Sulu/Bundle/PersistenceBundle/SuluPersistenceBundle.php line 22

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\PersistenceBundle;
  11. use Sulu\Bundle\PersistenceBundle\DependencyInjection\Compiler\ActivateResolveTargetEntityResolverPass;
  12. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  13. use Symfony\Component\DependencyInjection\ContainerBuilder;
  14. use Symfony\Component\HttpKernel\Bundle\Bundle;
  15. /**
  16.  * @final
  17.  */
  18. class SuluPersistenceBundle extends Bundle
  19. {
  20.     /**
  21.      * @internal
  22.      */
  23.     public function build(ContainerBuilder $container): void
  24.     {
  25.         $container->addCompilerPass(
  26.             new ActivateResolveTargetEntityResolverPass(),
  27.             PassConfig::TYPE_BEFORE_OPTIMIZATION,
  28.             10 // need to be run before the "EntityListenerPass" of the "DoctrineBundle"
  29.         );
  30.     }
  31. }