![]() 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-sales/Controller/Adminhtml/Order/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Sales\Controller\Adminhtml\Order; use Magento\Framework\Controller\ResultFactory; abstract class PdfDocumentsMassAction extends \Magento\Sales\Controller\Adminhtml\Order\AbstractMassAction { /** * @var \Magento\Sales\Model\ResourceModel\Order\CollectionFactory */ protected $orderCollectionFactory; /** * Execute action * * @return \Magento\Backend\Model\View\Result\Redirect * @throws \Magento\Framework\Exception\LocalizedException|\Exception */ public function execute() { try { $collection = $this->filter->getCollection($this->getOrderCollection()->create()); return $this->massAction($collection); } catch (\Exception $e) { $this->messageManager->addErrorMessage($e->getMessage()); /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */ $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT); return $resultRedirect->setPath($this->redirectUrl); } } /** * Get Order Collection Factory * * @return \Magento\Sales\Model\ResourceModel\Order\CollectionFactory * @deprecated 100.1.3 */ private function getOrderCollection() { if ($this->orderCollectionFactory === null) { $this->orderCollectionFactory = \Magento\Framework\App\ObjectManager::getInstance()->get( \Magento\Sales\Model\ResourceModel\Order\CollectionFactory::class ); } return $this->orderCollectionFactory; } }