Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExportDownloadsExcel.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
18  const ADMIN_RESOURCE = 'Magento_Reports::report_products';
19 
25  public function execute()
26  {
27  $fileName = 'products_downloads.xml';
28  $content = $this->_view->getLayout()->createBlock(
29  \Magento\Reports\Block\Adminhtml\Product\Downloads\Grid::class
30  )->setSaveParametersInSession(
31  true
32  )->getExcel(
33  $fileName
34  );
35 
36  return $this->_fileFactory->create($fileName, $content);
37  }
38 }
$fileName
Definition: translate.phtml:15