![]() 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/magento/module-catalog/Controller/Adminhtml/Product/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Catalog\Controller\Adminhtml\Product; use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface; use Magento\Framework\Controller\ResultFactory; /** * Backend reload of product create/edit form */ class Reload extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpPostActionInterface { /** * {@inheritdoc} */ public function execute() { if (!$this->getRequest()->getParam('set')) { return $this->resultFactory->create(ResultFactory::TYPE_FORWARD)->forward('noroute'); } $product = $this->productBuilder->build($this->getRequest()); /** @var \Magento\Framework\View\Result\Layout $resultLayout */ $resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT); $resultLayout->getLayout()->getUpdate()->addHandle(['catalog_product_' . $product->getTypeId()]); $resultLayout->getLayout()->getUpdate()->removeHandle('default'); $resultLayout->setHeader('Content-Type', 'application/json', true); return $resultLayout; } }