|
11 | 11 | use Magento\Framework\App\Action\Context;
|
12 | 12 | use Magento\Framework\App\Action\HttpGetActionInterface;
|
13 | 13 | use Magento\Framework\App\Action\HttpPostActionInterface;
|
| 14 | +use Magento\Framework\App\ActionInterface; |
| 15 | +use Magento\Framework\App\ObjectManager; |
14 | 16 | use Magento\Framework\Exception\NoSuchEntityException;
|
| 17 | +use Magento\Framework\Session\Generic; |
| 18 | +use Magento\Framework\Session\SidResolverInterface; |
15 | 19 | use Magento\Store\Api\StoreRepositoryInterface;
|
16 | 20 | use Magento\Store\Api\StoreResolverInterface;
|
17 | 21 | use Magento\Store\Model\Store;
|
@@ -58,16 +62,16 @@ public function __construct(
|
58 | 62 | Context $context,
|
59 | 63 | StoreRepositoryInterface $storeRepository,
|
60 | 64 | StoreResolverInterface $storeResolver,
|
61 |
| - \Magento\Framework\Session\Generic $session, |
62 |
| - \Magento\Framework\Session\SidResolverInterface $sidResolver, |
| 65 | + Generic $session, |
| 66 | + SidResolverInterface $sidResolver, |
63 | 67 | HashGenerator $hashGenerator,
|
64 | 68 | StoreManagerInterface $storeManager = null
|
65 | 69 | ) {
|
66 | 70 | parent::__construct($context);
|
67 | 71 | $this->storeRepository = $storeRepository;
|
68 | 72 | $this->storeResolver = $storeResolver;
|
69 | 73 | $this->hashGenerator = $hashGenerator;
|
70 |
| - $this->storeManager = $storeManager ?: \Magento\Framework\App\ObjectManager::getInstance()->get(StoreManagerInterface::class); |
| 74 | + $this->storeManager = $storeManager ?: ObjectManager::getInstance()->get(StoreManagerInterface::class); |
71 | 75 | }
|
72 | 76 |
|
73 | 77 | /**
|
@@ -100,11 +104,11 @@ public function execute()
|
100 | 104 | $this->messageManager->addErrorMessage($error);
|
101 | 105 | $this->_redirect->redirect($this->_response, $currentStore->getBaseUrl());
|
102 | 106 | } else {
|
103 |
| - $encodedUrl = $this->_request->getParam(\Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED); |
| 107 | + $encodedUrl = $this->_request->getParam(ActionInterface::PARAM_NAME_URL_ENCODED); |
104 | 108 | $query = [
|
105 | 109 | '___from_store' => $fromStore->getCode(),
|
106 | 110 | StoreResolverInterface::PARAM_NAME => $targetStoreCode,
|
107 |
| - \Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED => $encodedUrl, |
| 111 | + ActionInterface::PARAM_NAME_URL_ENCODED => $encodedUrl, |
108 | 112 | ];
|
109 | 113 |
|
110 | 114 | $customerHash = $this->hashGenerator->generateHash($fromStore);
|
|
0 commit comments