modules/XC/FreeShipping/src/FreeShippingBundle.php line 17

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. declare(strict_types=1);
  7. namespace XC\FreeShipping;
  8. use Symfony\Component\DependencyInjection\Compiler\PassConfig;
  9. use Symfony\Component\DependencyInjection\ContainerBuilder;
  10. use Symfony\Component\HttpKernel\Bundle\Bundle;
  11. use XC\FreeShipping\DependencyInjection\Compiler\ChangeCouponTypesPass;
  12. final class FreeShippingBundle extends Bundle
  13. {
  14.     public function build(ContainerBuilder $container): void
  15.     {
  16.         parent::build($container);
  17.         $bundles $container->getParameter('kernel.bundles');
  18.         if (isset($bundles['CouponsBundle'])) {
  19.             $container->addCompilerPass(new ChangeCouponTypesPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION710);
  20.         }
  21.     }
  22. }