Création du module FedEx
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
|
||||
namespace Colissimo\Controller;
|
||||
|
||||
use Colissimo\Colissimo;
|
||||
use Colissimo\Model\Config\ColissimoConfigValue;
|
||||
use Colissimo\FedEx;
|
||||
use Colissimo\Model\Config\FedExConfigValue;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Thelia\Controller\Admin\BaseAdminController;
|
||||
use Thelia\Core\Security\AccessManager;
|
||||
@@ -32,7 +32,7 @@ class Configuration extends BaseAdminController
|
||||
{
|
||||
if (null !== $response = $this->checkAuth(
|
||||
AdminResources::MODULE,
|
||||
[Colissimo::DOMAIN_NAME],
|
||||
[FedEx::DOMAIN_NAME],
|
||||
AccessManager::UPDATE
|
||||
)) {
|
||||
return $response;
|
||||
@@ -45,8 +45,8 @@ class Configuration extends BaseAdminController
|
||||
$validateForm = $this->validateForm($form);
|
||||
$data = $validateForm->getData();
|
||||
|
||||
Colissimo::setConfigValue(
|
||||
ColissimoConfigValue::ENABLED,
|
||||
FedEx::setConfigValue(
|
||||
FedExConfigValue::ENABLED,
|
||||
is_bool($data["enabled"]) ? (int) ($data["enabled"]) : $data["enabled"]
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user