/** * Handle the exporting from other known components * * @return void * @since 1.0 */ public function export() { $data = DataHelper::exportListsCSV(); header("Content-Type: application/octet-stream"); header("Accept-Ranges: bytes"); header("Content-Length: " . strlen($data)); header("Content-Disposition: attachment; filename=newslettter-data-export-" . date('Y-m-d-H-i-s') . '.csv'); echo $data; die; }