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