6 declare(strict_types=1);
63 private $storePathInfoValidator;
79 \
Magento\
Store\
App\Request\StorePathInfoValidator $storePathInfoValidator,
86 $this->storePathInfoValidator = $storePathInfoValidator;
87 $this->storesData = $storesData;
99 $storeCode = $this->storePathInfoValidator->getValidStoreCode($this->request);
104 $this->storeCookieManager->getStoreCodeFromCookie()
110 throw new \InvalidArgumentException(
__(
'Invalid store parameter.'));
138 return $this->storesData->getStoresData($this->runMode, $this->scopeCode);
165 throw new \Magento\Framework\Exception\NoSuchEntityException(
__(
'Requested store is inactive'));
181 $store = $this->storeRepository->getActiveStoreById(
$id);
183 throw new \Magento\Framework\Exception\NoSuchEntityException(
__(
'Default store is inactive'));
getRequestedStoreByCode($storeCode)
__construct(\Magento\Store\Api\StoreRepositoryInterface $storeRepository, \Magento\Store\Api\StoreCookieManagerInterface $storeCookieManager, \Magento\Framework\App\Request\Http $request, \Magento\Store\Model\StoresData $storesData, \Magento\Store\App\Request\StorePathInfoValidator $storePathInfoValidator, $runMode=ScopeInterface::SCOPE_STORE, $scopeCode=null)