app/Plugin/CustomerGroupPrice42/Bundle/CustomerGroupPriceBundle.php line 22

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