Explorar el Código

[Backend] Correctif

master
Guillaume hace 4 años
padre
commit
19d6860cd3
Se han modificado 2 ficheros con 12 adiciones y 4 borrados
  1. +1
    -4
      ShopBundle/Controller/Backend/AdminController.php
  2. +11
    -0
      ShopBundle/Controller/Backend/NewsController.php

+ 1
- 4
ShopBundle/Controller/Backend/AdminController.php Ver fichero

@@ -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 Ver fichero

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

Cargando…
Cancelar
Guardar