/**
  * Read stores data. First element is allowed store ids, second is default store id
  *
  * @return array
  */
 protected function readStoresData()
 {
     $reader = $this->readerList->getReader($this->runMode);
     return [$reader->getAllowedStoreIds($this->scopeCode), $reader->getDefaultStoreId($this->scopeCode)];
 }
Beispiel #2
0
 /**
  * Set current store for admin area
  *
  * @param \Magento\Framework\App\FrontController $subject
  * @param \Magento\Framework\App\RequestInterface $request
  * @return void
  *
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function beforeDispatch(\Magento\Framework\App\FrontController $subject, \Magento\Framework\App\RequestInterface $request)
 {
     $reader = $this->readerList->getReader($this->runMode);
     $defaultStoreId = $reader->getDefaultStoreId($this->scopeCode);
     $this->storeManager->setCurrentStore($defaultStoreId);
 }