浏览代码

twig config with applicationDefinition

packProduct
Fab 2 年前
父节点
当前提交
d2b753cfed
共有 2 个文件被更改,包括 48 次插入35 次删除
  1. +2
    -1
      Controller/ControllerTrait.php
  2. +46
    -34
      Definition/ApplicationDefinition.php

+ 2
- 1
Controller/ControllerTrait.php 查看文件

@@ -36,7 +36,7 @@ use Lc\CaracoleBundle\Container\Setting\SectionSettingContainer;
use Lc\CaracoleBundle\Container\User\UserMerchantContainer;
use Lc\CaracoleBundle\Container\User\UserPointSaleContainer;
use Lc\CaracoleBundle\Container\User\VisitorContainer;
use Lc\CaracoleBundle\Definition\ApplicationDefinition;
use Lc\SovBundle\Definition\ApplicationDefinition;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
@@ -171,6 +171,7 @@ trait ControllerTrait

public function getOrderShopContainer(): OrderShopContainer
{

return $this->get(OrderShopContainer::class);
}


+ 46
- 34
Definition/ApplicationDefinition.php 查看文件

@@ -44,40 +44,52 @@ class ApplicationDefinition extends SovAbstractApplicationDefinition
public static function getContainerList(): array
{
return array_merge(parent::getContainerList(), [
OrderShopContainer::class,
AddressContainer::class,
TaxRateContainer::class,
UnitContainer::class,
CreditHistoryContainer::class,
DocumentContainer::class,
MerchantContainer::class,
OrderPaymentContainer::class,
OrderProductContainer::class,
OrderProductReductionCatalogContainer::class,
OrderProductRefundContainer::class,
OrderReductionCartContainer::class,
OrderReductionCreditContainer::class,
OrderRefundContainer::class,
OrderStatusContainer::class,
OrderStatusHistoryContainer::class,
PointSaleContainer::class,
ProductCategoryContainer::class,
ProductContainer::class,
ProductFamilyContainer::class,
ReductionCartContainer::class,
ReductionCatalogContainer::class,
ReductionCreditContainer::class,
OpeningContainer::class,
SectionContainer::class,
MerchantSettingContainer::class,
SectionSettingContainer::class,
UserMerchantContainer::class,
UserPointSaleContainer::class,
VisitorContainer::class,
DistributionContainer::class,
ProductFamilySectionPropertyContainer::class,
QualityLabelContainer::class,
PointSaleSectionContainer::class,
OrderShopContainer::class,
AddressContainer::class,
TaxRateContainer::class,
UnitContainer::class,
CreditHistoryContainer::class,
DocumentContainer::class,
MerchantContainer::class,
OrderPaymentContainer::class,
OrderProductContainer::class,
OrderProductReductionCatalogContainer::class,
OrderProductRefundContainer::class,
OrderReductionCartContainer::class,
OrderReductionCreditContainer::class,
OrderRefundContainer::class,
OrderStatusContainer::class,
OrderStatusHistoryContainer::class,
PointSaleContainer::class,
ProductCategoryContainer::class,
ProductContainer::class,
ProductFamilyContainer::class,
ReductionCartContainer::class,
ReductionCatalogContainer::class,
ReductionCreditContainer::class,
OpeningContainer::class,
SectionContainer::class,
MerchantSettingContainer::class,
SectionSettingContainer::class,
UserMerchantContainer::class,
UserPointSaleContainer::class,
VisitorContainer::class,
DistributionContainer::class,
ProductFamilySectionPropertyContainer::class,
QualityLabelContainer::class,
PointSaleSectionContainer::class,
]);
}

public static function getSubscribedContainerServices(): array
{

$array = [];

foreach (self::getContainerList() as $container) {
$array[$container] = $container;
}

return $array;
}
}

正在加载...
取消
保存