![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/wyomind/framework/Controller/Adminhtml/Progress/ |
<?php /** * Copyright © 2019 Wyomind. All rights reserved. * See LICENSE.txt for license details. */ /** * Copyright © 2020 Wyomind. All rights reserved. * See LICENSE.txt for license details. */ namespace Wyomind\Framework\Controller\Adminhtml\Progress; /** * Class Updater * @package Wyomind\Framework\Controller\Adminhtml */ class Updater extends \Magento\Backend\App\Action { /** * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|void */ public function execute() { $json=[]; $data=$this->getRequest()->getPost('data'); foreach ($data as $f) { $row=new \Magento\Framework\DataObject; $row->setId($f["id"]); $field=$f["field"]; $row->setData($field, $f["cron"]); $module=$f["module"]; $status=$this->_objectManager->create("Wyomind\\" . $module . "\Block\Adminhtml\Progress\Status"); $json[]=["id"=>$f["id"], "content"=>($status->render($row))]; } $this->getResponse()->representJson($this->_objectManager->create('Magento\Framework\Json\Helper\Data')->jsonEncode($json)); } /** * @return bool */ protected function _isAllowed() { return true; } }