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

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. class SuluPersistenceBundle extends Bundle
  16. {
  17.     /**
  18.      * @return void
  19.      */
  20.     public function build(ContainerBuilder $container)
  21.     {
  22.         $container->addCompilerPass(
  23.             new ActivateResolveTargetEntityResolverPass(),
  24.             PassConfig::TYPE_BEFORE_OPTIMIZATION,
  25.             10 // need to be run before the "EntityListenerPass" of the "DoctrineBundle"
  26.         );
  27.     }
  28. }