瀏覽代碼

Merge branch 'develop'

master
Guillaume 4 年之前
父節點
當前提交
b2d5152481
共有 2 個文件被更改,包括 12 次插入4 次删除
  1. +1
    -4
      ShopBundle/Controller/Backend/AdminController.php
  2. +11
    -0
      ShopBundle/Controller/Backend/NewsController.php

+ 1
- 4
ShopBundle/Controller/Backend/AdminController.php 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存