-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCoreShopOrderBundle.php
More file actions
96 lines (85 loc) · 4.83 KB
/
CoreShopOrderBundle.php
File metadata and controls
96 lines (85 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
declare(strict_types=1);
/*
* CoreShop
*
* This source file is available under the terms of the
* CoreShop Commercial License (CCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.com)
* @license CoreShop Commercial License (CCL)
*
*/
namespace CoreShop\Bundle\OrderBundle;
use CoreShop\Bundle\CurrencyBundle\CoreShopCurrencyBundle;
use CoreShop\Bundle\CustomerBundle\CoreShopCustomerBundle;
use CoreShop\Bundle\MoneyBundle\CoreShopMoneyBundle;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\CartItemPriceRuleActionPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\CartItemPriceRuleConditionPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\CartPriceRuleActionPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\CartPriceRuleConditionPass;
use CoreShop\Bundle\StudioFormBundle\DependencyInjection\Compiler\RegisterFormTypesFromTagsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\PurchasableCustomAttributesCalculatorsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\PurchasableDiscountCalculatorsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\PurchasableDiscountPriceCalculatorsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\PurchasablePriceCalculatorsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\PurchasableRetailPriceCalculatorsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\PurchasableWholesalePriceCalculatorsPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\RegisterCartProcessorPass;
use CoreShop\Bundle\OrderBundle\DependencyInjection\Compiler\RegisterWorkflowValidatorPass;
use CoreShop\Bundle\PaymentBundle\CoreShopPaymentBundle;
use CoreShop\Bundle\ResourceBundle\AbstractResourceBundle;
use CoreShop\Bundle\ResourceBundle\CoreShopResourceBundle;
use CoreShop\Bundle\RuleBundle\CoreShopRuleBundle;
use CoreShop\Bundle\StorageListBundle\CoreShopStorageListBundle;
use CoreShop\Bundle\StoreBundle\CoreShopStoreBundle;
use CoreShop\Bundle\WorkflowBundle\CoreShopWorkflowBundle;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
final class CoreShopOrderBundle extends AbstractResourceBundle
{
public function getSupportedDrivers(): array
{
return [
CoreShopResourceBundle::DRIVER_DOCTRINE_ORM,
];
}
public function build(ContainerBuilder $container): void
{
parent::build($container);
$container->addCompilerPass(new RegisterCartProcessorPass());
$container->addCompilerPass(new CartPriceRuleActionPass());
$container->addCompilerPass(new CartPriceRuleConditionPass());
$container->addCompilerPass(new CartItemPriceRuleActionPass());
$container->addCompilerPass(new CartItemPriceRuleConditionPass());
$container->addCompilerPass(new RegisterWorkflowValidatorPass());
$container->addCompilerPass(new PurchasablePriceCalculatorsPass());
$container->addCompilerPass(new PurchasableDiscountCalculatorsPass());
$container->addCompilerPass(new PurchasableDiscountPriceCalculatorsPass());
$container->addCompilerPass(new PurchasableRetailPriceCalculatorsPass());
$container->addCompilerPass(new PurchasableWholesalePriceCalculatorsPass());
$container->addCompilerPass(new PurchasableCustomAttributesCalculatorsPass());
$container->addCompilerPass(new RegisterFormTypesFromTagsPass(CartPriceRuleConditionPass::CART_PRICE_RULE_CONDITION_TAG));
$container->addCompilerPass(new RegisterFormTypesFromTagsPass(CartPriceRuleActionPass::CART_PRICE_RULE_ACTION_TAG));
$container->addCompilerPass(new RegisterFormTypesFromTagsPass(CartItemPriceRuleConditionPass::CART_ITEM_PRICE_RULE_CONDITION_TAG));
$container->addCompilerPass(new RegisterFormTypesFromTagsPass(CartItemPriceRuleActionPass::CART_ITEM_PRICE_RULE_ACTION_TAG));
}
public static function registerDependentBundles(BundleCollection $collection): void
{
parent::registerDependentBundles($collection);
$collection->addBundle(new CoreShopWorkflowBundle(), 3600);
$collection->addBundle(new CoreShopRuleBundle(), 3500);
$collection->addBundle(new CoreShopCustomerBundle(), 3100);
$collection->addBundle(new CoreShopCurrencyBundle(), 2700);
$collection->addBundle(new CoreShopStoreBundle(), 2500);
$collection->addBundle(new CoreShopPaymentBundle(), 2200);
$collection->addBundle(new CoreShopMoneyBundle(), 1550);
$collection->addBundle(new CoreShopStorageListBundle(), 100);
}
protected function getModelNamespace(): string
{
return 'CoreShop\Component\Order\Model';
}
}