Smile\ElasticsuiteCore\Controller\Adminhtml\Search\Request\RelevanceConfig\Save::execute PHP Метод

execute() публичный Метод

Save configuration
public execute ( ) : Magento\Backend\Model\View\Result\Redirect
Результат Magento\Backend\Model\View\Result\Redirect
    public function execute()
    {
        try {
            $section = $this->getRequest()->getParam('section');
            $container = $this->getRequest()->getParam('container');
            $store = $this->getRequest()->getParam('store');
            $configData = ['section' => $section, 'container' => $container, 'store' => $store, 'groups' => $this->getGroupsForSave()];
            /** @var \Magento\Config\Model\Config $configModel  */
            $configModel = $this->configFactory->create(['data' => $configData]);
            $configModel->save();
            $this->messageManager->addSuccess(__('You saved the configuration.'));
        } catch (\Magento\Framework\Exception\LocalizedException $e) {
            $messages = explode("\n", $e->getMessage());
            foreach ($messages as $message) {
                $this->messageManager->addError($message);
            }
        } catch (\Exception $e) {
            $this->messageManager->addException($e, __('Something went wrong while saving this configuration:') . ' ' . $e->getMessage());
        }
        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultRedirectFactory->create();
        return $resultRedirect->setPath('*/*/edit', ['_current' => ['section', 'container', 'store'], '_nosid' => true]);
    }