Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExportDownloadsCsv.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.csv';
28  $content = $this->_view->getLayout()->createBlock(
29  \Magento\Reports\Block\Adminhtml\Product\Downloads\Grid::class
30  )->setSaveParametersInSession(
31  true
32  )->getCsv();
33 
34  return $this->_fileFactory->create($fileName, $content);
35  }
36 }
$fileName
Definition: translate.phtml:15