Procházet zdrojové kódy

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Fabien Normand před 2 roky
rodič
revize
5a929456f9
2 změnil soubory, kde provedl 8 přidání a 14 odebrání
  1. +2
    -14
      Definition/Field/Product/ProductCategoryFieldDefinition.php
  2. +6
    -0
      Twig/StoreTwigExtension.php

+ 2
- 14
Definition/Field/Product/ProductCategoryFieldDefinition.php Zobrazit soubor

@@ -38,7 +38,8 @@ class ProductCategoryFieldDefinition extends AbstractFieldDefinition
'createdAt',
'updatedAt',
'status',
'saleStatus'
'saleStatus',
'isEligibleTicketRestaurant'
]);
}

@@ -51,19 +52,6 @@ class ProductCategoryFieldDefinition extends AbstractFieldDefinition
];
}

public function configurePanelMain()
{
return [
'section',
'title',
'parent',
'description',
'isEligibleTicketRestaurant',
'saleStatus',
'status',
];
}

public function configureFields(): array
{
$productCategoryArray = $this->productCategoryStore

+ 6
- 0
Twig/StoreTwigExtension.php Zobrazit soubor

@@ -86,6 +86,7 @@ class StoreTwigExtension extends AbstractExtension
new TwigFunction('merchant_current', [$this, 'getMerchantCurrent']),
new TwigFunction('user_merchant_current', [$this, 'getUserMerchantCurrent']),
new TwigFunction('section_current', [$this, 'getSectionCurrent']),
new TwigFunction('section_default', [$this, 'getSectionDefault']),
new TwigFunction('section_current_default', [$this, 'getSectionCurrentDefault']),
new TwigFunction('section_current_visited', [$this, 'getSectionCurrentVisited']),
new TwigFunction('is_out_of_sections', [$this, 'isOutOfSections']),
@@ -129,6 +130,11 @@ class StoreTwigExtension extends AbstractExtension
return $this->sectionResolver->getCurrent();
}

public function getSectionDefault(): ?SectionInterface
{
return $this->sectionStore->setMerchant($this->merchantResolver->getCurrent())->getOneDefault();
}

public function getSectionCurrentDefault(): ?SectionInterface
{
return $this->sectionResolver->getCurrent(true);

Načítá se…
Zrušit
Uložit