瀏覽代碼

Frontend : attribution d'un bandeau à chaque page

reduction
Guillaume 4 年之前
父節點
當前提交
b72d9583e7
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. +4
    -1
      ShopBundle/Twig/FrontendTwigExtension.php

+ 4
- 1
ShopBundle/Twig/FrontendTwigExtension.php 查看文件

@@ -8,6 +8,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Lc\ShopBundle\Form\Frontend\NewsletterType;
use Lc\ShopBundle\Repository\ProductCategoryRepository;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Security;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
@@ -21,9 +22,10 @@ class FrontendTwigExtension extends AbstractExtension
protected $formFactory ;
protected $productCategoryRepository ;
protected $hubRepository ;
protected $requestStack ;

public function __construct(EntityManagerInterface $em, Security $security, ProductCategoryRepository $productCategoryRepository,
GlobalParam $globalParam, FormFactoryInterface $formFactory, HubRepository $hubRepository)
GlobalParam $globalParam, FormFactoryInterface $formFactory, HubRepository $hubRepository, RequestStack $requestStack)
{
$this->em = $em ;
$this->security = $security ;
@@ -31,6 +33,7 @@ class FrontendTwigExtension extends AbstractExtension
$this->hubRepository = $hubRepository ;
$this->globalParam = $globalParam ;
$this->formFactory = $formFactory ;
$this->requestStack = $requestStack ;
}

public function getFunctions()

Loading…
取消
儲存