SetStore.php 560 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Backend\Controller\Adminhtml\System;
  8. class SetStore extends \Magento\Backend\Controller\Adminhtml\System
  9. {
  10. /**
  11. * @return void
  12. */
  13. public function execute()
  14. {
  15. $storeId = (int)$this->getRequest()->getParam('store');
  16. if ($storeId) {
  17. $this->_session->setStoreId($storeId);
  18. }
  19. $this->getResponse()->setRedirect($this->_redirect->getRedirectUrl($this->getUrl('*')));
  20. }
  21. }