Browse Source

twig config with applicationDefinition

packProduct
Fab 2 years ago
parent
commit
d2b753cfed
2 changed files with 48 additions and 35 deletions
  1. +2
    -1
      Controller/ControllerTrait.php
  2. +46
    -34
      Definition/ApplicationDefinition.php

+ 2
- 1
Controller/ControllerTrait.php View File

@@ -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 View File

@@ -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;
}
}

Loading…
Cancel
Save