瀏覽代碼

Merge branch 'develop'

master
Guillaume Bourgeois 11 月之前
父節點
當前提交
5b7918ee20
共有 1 個檔案被更改,包括 6 行新增0 行删除
  1. +6
    -0
      Twig/StoreTwigExtension.php

+ 6
- 0
Twig/StoreTwigExtension.php 查看文件

@@ -84,6 +84,7 @@ class StoreTwigExtension extends AbstractExtension
new TwigFunction('cart_current', [$this, 'getCartCurrent']),
new TwigFunction('cart_current_visited', [$this, 'getCartCurrentVisited']),
new TwigFunction('merchant_current', [$this, 'getMerchantCurrent']),
new TwigFunction('merchant_current_slug', [$this, 'getMerchantCurrentSlug']),
new TwigFunction('user_merchant_current', [$this, 'getUserMerchantCurrent']),
new TwigFunction('section_current', [$this, 'getSectionCurrent']),
new TwigFunction('section_default', [$this, 'getSectionDefault']),
@@ -189,6 +190,11 @@ class StoreTwigExtension extends AbstractExtension
return $this->merchantResolver->getCurrent();
}

public function getMerchantCurrentSlug(): string
{
return $this->merchantResolver->getCurrent()->getSlug();
}

public function getUserMerchantCurrent(): ?UserMerchantInterface
{
return $this->merchantResolver->getUserMerchant();

Loading…
取消
儲存