Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ExportCsv.php
Go to the documentation of this file.
1 <?php
8 
11 
13 {
19  public function execute()
20  {
21  $this->_view->loadLayout();
22  $fileName = 'subscribers.csv';
23  $content = $this->_view->getLayout()->getChildBlock('adminhtml.newslettrer.subscriber.grid', 'grid.export');
24 
25  return $this->_fileFactory->create(
26  $fileName,
27  $content->getCsvFile($fileName),
28  DirectoryList::VAR_DIR
29  );
30  }
31 }
$fileName
Definition: translate.phtml:15