vendor/kematjaya/user-bundle/src/UserBundle.php line 14

Open in your IDE?
  1. <?php
  2. namespace Kematjaya\UserBundle;
  3. use Kematjaya\UserBundle\Subscriber\UserTypeSubscriberInterface;
  4. use Kematjaya\UserBundle\DependencyInjection\Compiler\UserCompilerPass;
  5. use Kematjaya\UserBundle\Subscriber\CompilerPass\UserTypeCompilerPass;
  6. use Symfony\Component\HttpKernel\Bundle\Bundle;
  7. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  8. use Symfony\Component\DependencyInjection\ContainerBuilder;
  9. /**
  10.  * @author Nur Hidayatullah <kematjaya0@gmail.com>
  11.  */
  12. class UserBundle extends Bundle
  13. {
  14.     public function build(ContainerBuilder $container)
  15.     {
  16.         parent::build($container);
  17.         
  18.         $container->registerForAutoconfiguration(UserTypeSubscriberInterface::class)
  19.                 ->addTag(UserTypeSubscriberInterface::TAG_NAME);
  20.         
  21.         $container->addCompilerPass(new UserTypeCompilerPass());
  22.         $container->addCompilerPass(new UserCompilerPass(), PassConfig::TYPE_BEFORE_REMOVING);
  23.     }
  24.     
  25. }