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
ExportViewedExcel.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Reports\Controller\Adminhtml\Report\Product
;
8
9
use
Magento\Framework\App\ResponseInterface
;
10
use
Magento\Framework\App\Filesystem\DirectoryList
;
11
12
class
ExportViewedExcel
extends
\Magento\Reports\Controller\Adminhtml\Report\Product
13
{
19
const
ADMIN_RESOURCE
=
'Magento_Reports::report_products'
;
20
26
public
function
execute
()
27
{
28
$fileName
=
'products_mostviewed.xml'
;
29
$grid = $this->_view->getLayout()->createBlock(\
Magento
\Reports\Block\Adminhtml\
Product
\
Viewed
\Grid::class);
30
$this->
_initReportAction
($grid);
31
return
$this->_fileFactory->create(
32
$fileName
,
33
$grid->getExcelFile(
$fileName
),
34
DirectoryList::VAR_DIR
35
);
36
}
37
}
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\Viewed
Definition:
Viewed.php:12
Magento\Reports\Controller\Adminhtml\Report\Product\ExportViewedExcel\execute
execute()
Definition:
ExportViewedExcel.php:26
Magento\Reports\Controller\Adminhtml\Report\Product
Definition:
Product.php:18
Magento\Reports\Controller\Adminhtml\Report\Product\ExportViewedExcel\ADMIN_RESOURCE
const ADMIN_RESOURCE
Definition:
ExportViewedExcel.php:19
$fileName
$fileName
Definition:
translate.phtml:15
Magento
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Reports\Controller\Adminhtml\Report\AbstractReport\_initReportAction
_initReportAction($blocks)
Definition:
AbstractReport.php:113
Magento\Framework\App\ResponseInterface
Definition:
ResponseInterface.php:14
Magento\Reports\Controller\Adminhtml\Report\Product\ExportViewedExcel
Definition:
ExportViewedExcel.php:12