Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SetStore.php
Go to the documentation of this file.
1 <?php
8 
10 {
14  public function execute()
15  {
16  $storeId = (int)$this->getRequest()->getParam('store');
17  if ($storeId) {
18  $this->_session->setStoreId($storeId);
19  }
20  $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
21  }
22 }