app/Plugin/CustomerGroupRank42/Bundle/CustomerGroupRankBundle.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of CustomerGroupRank
  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\CustomerGroupRank42\Bundle;
  13. use Plugin\CustomerGroupRank42\DependencyInjection\Compiler\RankPass;
  14. use Plugin\CustomerGroupRank42\Service\Rank\RankInterface;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. class CustomerGroupRankBundle extends Bundle
  18. {
  19.     /**
  20.      * @param ContainerBuilder $container
  21.      *
  22.      * @return void
  23.      */
  24.     public function build(ContainerBuilder $container): void
  25.     {
  26.         parent::build($container);
  27.         $container->registerForAutoconfiguration(RankInterface::class)
  28.             ->addTag(RankPass::TAG);
  29.         $container->addCompilerPass(new RankPass());
  30.     }
  31. }