Browse Source

Merge branch 'develop'

master
Guillaume 4 years ago
parent
commit
b2d5152481
2 changed files with 12 additions and 4 deletions
  1. +1
    -4
      ShopBundle/Controller/Backend/AdminController.php
  2. +11
    -0
      ShopBundle/Controller/Backend/NewsController.php

+ 1
- 4
ShopBundle/Controller/Backend/AdminController.php View File

@@ -41,12 +41,10 @@ class AdminController extends EasyAdminController
protected $orderUtils;
protected $mailUtils ;
protected $translator;
protected $parameterBag ;
protected $filtersForm = null;

public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em,
MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator,
ParameterBagInterface $parameterBag)
MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator)
{
$this->security = $security;
$this->userManager = $userManager;
@@ -57,7 +55,6 @@ class AdminController extends EasyAdminController
$this->orderUtils = $utilsManager->getOrderUtils();;
$this->mailUtils = $utilsManager->getMailUtils() ;
$this->translator = $translator;
$this->parameterBag = $parameterBag ;
}

public function createCustomForm($class, $action, $parameters, $data = true)

+ 11
- 0
ShopBundle/Controller/Backend/NewsController.php View File

@@ -10,6 +10,7 @@ use Lc\ShopBundle\Context\UserInterface;
use Lc\ShopBundle\Services\MailUtils;
use Lc\ShopBundle\Services\UtilsManager;
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Core\Security;
@@ -17,6 +18,16 @@ use Symfony\Contracts\Translation\TranslatorInterface;

class NewsController extends AdminController
{
protected $parameterBag ;

public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em,
MailjetTransport $mailjetTransport, UtilsManager $utilsManager, TranslatorInterface $translator,
ParameterBagInterface $parameterBag)
{
$this->parameterBag = $parameterBag ;
parent::__construct($security, $userManager, $em, $mailjetTransport, $utilsManager, $translator);
}

public function sendTestAction()
{
$newsletter = $this->getNewsletter() ;

Loading…
Cancel
Save