Browse Source

Frontend : attribution d'un bandeau à chaque page

reduction
Guillaume 4 years ago
parent
commit
b72d9583e7
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      ShopBundle/Twig/FrontendTwigExtension.php

+ 4
- 1
ShopBundle/Twig/FrontendTwigExtension.php View File

@@ -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…
Cancel
Save