modules/CDev/Coupons/src/CouponsBundle.php line 15

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. namespace CDev\Coupons;
  7. use CDev\Coupons\DependencyInjection\Compiler\ChangeCouponTypesPass;
  8. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  9. use Symfony\Component\DependencyInjection\ContainerBuilder;
  10. use Symfony\Component\HttpKernel\Bundle\Bundle;
  11. final class CouponsBundle extends Bundle
  12. {
  13.     public function build(ContainerBuilder $container): void
  14.     {
  15.         parent::build($container);
  16.         $bundles $container->getParameter('kernel.bundles');
  17.         if (isset($bundles['FreeShippingBundle'])) {
  18.             $container->addCompilerPass(new ChangeCouponTypesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION710);
  19.         }
  20.     }
  21. }