11 class EditStore extends \Magento\Backend\Controller\Adminhtml\System\Store implements HttpGetActionInterface
21 $this->_coreRegistry->register(
'store_post_data', $this->
_getSession()->getPostData());
24 if (!$this->_coreRegistry->registry(
'store_type')) {
25 $this->_coreRegistry->register(
'store_type',
'store');
27 if (!$this->_coreRegistry->registry(
'store_action')) {
28 $this->_coreRegistry->register(
'store_action',
'edit');
30 switch ($this->_coreRegistry->registry(
'store_type')) {
32 $itemId = $this->
getRequest()->getParam(
'website_id',
null);
35 $notExists =
__(
"The website does not exist.");
36 $codeBase =
__(
'Before modifying the website code please make sure it is not used in index.php.');
39 $itemId = $this->
getRequest()->getParam(
'group_id',
null);
42 $notExists =
__(
"The store does not exist");
46 $itemId = $this->
getRequest()->getParam(
'store_id',
null);
49 $notExists =
__(
"Store view doesn't exist");
50 $codeBase =
__(
'Before modifying the store view code please make sure it is not used in index.php.');
55 if (
null !== $itemId) {
59 if (
$model->getId() || $this->_coreRegistry->registry(
'store_action') ==
'add') {
60 $this->_coreRegistry->register(
'store_data',
$model);
61 if ($this->_coreRegistry->registry(
'store_action') ==
'edit' && $codeBase && !
$model->isReadOnly()) {
62 $this->messageManager->addNoticeMessage($codeBase);
64 $resultPage = $this->createPage();
65 if ($this->_coreRegistry->registry(
'store_action') ==
'add') {
66 $resultPage->getConfig()->getTitle()->prepend((
__(
'New ') .
$title));
68 $resultPage->getConfig()->getTitle()->prepend(
$model->getName());
70 $resultPage->getConfig()->getTitle()->prepend(
__(
'Stores'));
71 $resultPage->addContent($resultPage->getLayout()->createBlock(
76 $this->messageManager->addErrorMessage($notExists);
78 $resultRedirect = $this->resultRedirectFactory->create();
79 return $resultRedirect->setPath(
'adminhtml/*/');