vendor/coreshop/core-shop/src/CoreShop/Bundle/PaymentBundle/CoreShopPaymentBundle.php line 31

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * CoreShop
  5.  *
  6.  * This source file is available under two different licenses:
  7.  *  - GNU General Public License version 3 (GPLv3)
  8.  *  - CoreShop Commercial License (CCL)
  9.  * Full copyright and license information is available in
  10.  * LICENSE.md which is distributed with this source code.
  11.  *
  12.  * @copyright  Copyright (c) CoreShop GmbH (https://www.coreshop.org)
  13.  * @license    https://www.coreshop.org/license     GPLv3 and CCL
  14.  *
  15.  */
  16. namespace CoreShop\Bundle\PaymentBundle;
  17. use CoreShop\Bundle\PaymentBundle\DependencyInjection\Compiler\PaymentCalculatorsPass;
  18. use CoreShop\Bundle\PaymentBundle\DependencyInjection\Compiler\PaymentProviderRuleActionPass;
  19. use CoreShop\Bundle\PaymentBundle\DependencyInjection\Compiler\PaymentProviderRuleConditionPass;
  20. use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
  21. use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
  22. use CoreShop\Bundle\RuleBundle\CoreShopRuleBundle;
  23. use CoreShop\Bundle\WorkflowBundle\CoreShopWorkflowBundle;
  24. use Pimcore\HttpKernel\BundleCollection\BundleCollection;
  25. use Symfony\Component\DependencyInjection\ContainerBuilder;
  26. final class CoreShopPaymentBundle extends AbstractResourceBundle
  27. {
  28.     public function getSupportedDrivers(): array
  29.     {
  30.         return [
  31.             CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
  32.         ];
  33.     }
  34.     public static function registerDependentBundles(BundleCollection $collection): void
  35.     {
  36.         parent::registerDependentBundles($collection);
  37.         $collection->addBundle(new CoreShopWorkflowBundle(), 1550);
  38.         $collection->addBundle(new CoreShopRuleBundle(), 3500);
  39.     }
  40.     public function build(ContainerBuilder $container): void
  41.     {
  42.         parent::build($container);
  43.         $container->addCompilerPass(new PaymentProviderRuleConditionPass());
  44.         $container->addCompilerPass(new PaymentProviderRuleActionPass());
  45.         $container->addCompilerPass(new PaymentCalculatorsPass());
  46.     }
  47.     protected function getModelNamespace(): string
  48.     {
  49.         return 'CoreShop\Component\Payment\Model';
  50.     }
  51. }