24 $integrationId = (int)$this->
getRequest()->getParam(self::PARAM_INTEGRATION_ID);
27 $integrationData = $this->_integrationService->get($integrationId)->getData();
28 $originalName = $this->escaper->escapeHtml($integrationData[Info::DATA_NAME]);
30 $this->messageManager->addError($this->escaper->escapeHtml($e->getMessage()));
33 }
catch (\Exception $e) {
34 $this->_logger->critical($e);
35 $this->messageManager->addError(
__(
'Internal error. Check exception log for details.'));
39 $restoredIntegration = $this->
_getSession()->getIntegrationData();
40 if ($restoredIntegration) {
41 $integrationData = array_merge($integrationData, $restoredIntegration);
44 $this->messageManager->addError(
__(
'Integration ID is not specified or is invalid.'));
48 $this->_registry->register(self::REGISTRY_KEY_CURRENT_INTEGRATION, $integrationData);
50 $this->_view->loadLayout();
52 $this->_setActiveMenu(
'Magento_Integration::system_integrations');
54 if ($this->_integrationData->isConfigType($integrationData)) {
55 $title =
__(
'View "%1" Integration', $originalName);
57 $title =
__(
'Edit "%1" Integration', $originalName);
61 $this->_view->getPage()->getConfig()->getTitle()->prepend(
$title);
62 $this->_view->renderLayout();
restoreResourceAndSaveToRegistry()
_redirect($path, $arguments=[])
_addBreadcrumb($label, $title, $link=null)