Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-sales
Controller
Adminhtml
Order
PdfDocumentsMassAction.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Sales\Controller\Adminhtml\Order
;
8
9
use
Magento\Framework\Controller\ResultFactory
;
10
11
abstract
class
PdfDocumentsMassAction
extends
\Magento\Sales\Controller\Adminhtml\Order\AbstractMassAction
12
{
16
protected
$orderCollectionFactory
;
17
24
public
function
execute
()
25
{
26
try
{
27
$collection
= $this->filter->getCollection($this->getOrderCollection()->create());
28
return
$this->
massAction
(
$collection
);
29
}
catch
(\Exception $e) {
30
$this->messageManager->addErrorMessage($e->getMessage());
32
$resultRedirect = $this->resultFactory->create(
ResultFactory::TYPE_REDIRECT
);
33
return
$resultRedirect->setPath($this->redirectUrl);
34
}
35
}
36
43
private
function
getOrderCollection()
44
{
45
if
($this->orderCollectionFactory ===
null
) {
46
$this->orderCollectionFactory =
\Magento\Framework\App\ObjectManager::getInstance
()->get(
47
\
Magento
\Sales\Model\
ResourceModel
\
Order
\CollectionFactory::class
48
);
49
}
50
return
$this->orderCollectionFactory
;
51
}
52
}
Magento\Framework\App\ObjectManager\getInstance
static getInstance()
Definition:
ObjectManager.php:33
Magento\Catalog\Model\ResourceModel\Product
Definition:
CollectionTest.php:6
Magento\Framework\Controller\ResultFactory
Definition:
ResultFactory.php:17
Magento\Sales\Controller\Adminhtml\Order\PdfDocumentsMassAction
Definition:
PdfDocumentsMassAction.php:11
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Sales\Controller\Adminhtml\Order\AbstractMassAction\massAction
massAction(AbstractCollection $collection)
Magento
Magento\Sales\Controller\Adminhtml\Order
Definition:
Order.php:22
Magento\Sales\Controller\Adminhtml\Order
Definition:
AuthorizationMock.php:6
Magento\Framework\Controller\ResultFactory\TYPE_REDIRECT
const TYPE_REDIRECT
Definition:
ResultFactory.php:24
$collection
$collection
Definition:
catalog_category_with_apostrophe_rollback.php:17
Magento\Sales\Controller\Adminhtml\Order\PdfDocumentsMassAction\$orderCollectionFactory
$orderCollectionFactory
Definition:
PdfDocumentsMassAction.php:16