Quellcode durchsuchen

StoreTwigExtension

packProduct
Guillaume vor 3 Jahren
Ursprung
Commit
7232c555dc
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. +6
    -0
      Twig/StoreTwigExtension.php

+ 6
- 0
Twig/StoreTwigExtension.php Datei anzeigen

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

Laden…
Abbrechen
Speichern