app/Plugin/CustomerGroup42/Bundle/CustomerGroupBundle.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of CustomerGroup
  4.  *
  5.  * Copyright(c) Akira Kurozumi <info@a-zumi.net>
  6.  *
  7.  * https://a-zumi.net
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Plugin\CustomerGroup42\Bundle;
  13. use Plugin\CustomerGroup42\DependencyInjection\Compiler\GatePass;
  14. use Plugin\CustomerGroup42\Service\Gate\GateInterface;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. class CustomerGroupBundle extends Bundle
  18. {
  19.     public function build(ContainerBuilder $container): void
  20.     {
  21.         parent::build($container);
  22.         $container->registerForAutoconfiguration(GateInterface::class)
  23.             ->addTag(GatePass::TAG);
  24.         $container->addCompilerPass(new GatePass());
  25.     }
  26. }