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-reports
Controller
Adminhtml
Report
Product
ExportSoldCsv.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Reports\Controller\Adminhtml\Report\Product
;
8
9
use
Magento\Backend\Block\Widget\Grid\ExportInterface
;
10
use
Magento\Framework\App\ResponseInterface
;
11
use
Magento\Framework\App\Filesystem\DirectoryList
;
12
13
class
ExportSoldCsv
extends
\Magento\Reports\Controller\Adminhtml\Report\Product
14
{
20
const
ADMIN_RESOURCE
=
'Magento_Reports::report_products'
;
21
27
public
function
execute
()
28
{
29
$this->_view->loadLayout();
30
$fileName
=
'products_ordered.csv'
;
32
$exportBlock = $this->_view->getLayout()->getChildBlock(
'adminhtml.report.grid'
,
'grid.export'
);
33
return
$this->_fileFactory->create(
34
$fileName
,
35
$exportBlock->getCsvFile(),
36
DirectoryList::VAR_DIR
37
);
38
}
39
}
Magento\Reports\Controller\Adminhtml\Report\Product
Definition:
ViewedTest.php:7
Magento\Framework\App\Filesystem\DirectoryList\VAR_DIR
const VAR_DIR
Definition:
DirectoryList.php:58
Magento\Reports\Controller\Adminhtml\Report\Product\ExportSoldCsv\ADMIN_RESOURCE
const ADMIN_RESOURCE
Definition:
ExportSoldCsv.php:20
Magento\Backend\Block\Widget\Grid\ExportInterface
Definition:
ExportInterface.php:15
Magento\Reports\Controller\Adminhtml\Report\Product
Definition:
Product.php:18
Magento\Reports\Controller\Adminhtml\Report\Product\ExportSoldCsv
Definition:
ExportSoldCsv.php:13
Magento\Framework\App\ActionInterface\execute
execute()
$fileName
$fileName
Definition:
translate.phtml:15
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\App\ResponseInterface
Definition:
ResponseInterface.php:14