} } /** * Actions */ // cancel if ($http->hasPostVariable('CancelButton')) { $csvFilePath = ''; return $module->redirectToView('subscription_list', array($nodeId)); } elseif ($http->hasPostVariable('ExportButton')) { $exportCsvFile = true; /** * Export */ // fetch data $arrCsvData = getDataForCsv($listContentObjectId, 0, $module); if ($arrCsvData !== FALSE) { //export data in csv format for download in webbrowser $objCjwNLCsvExport = new CjwNewsletterCsvExport($arrCsvData, $delimiter, $arrDisplayItems); // write csv string => $objCjwNLCsvExport->CsvResult $resWrite = $objCjwNLCsvExport->writeCsv(); // create download csv file if ($objCjwNLCsvExport->CsvResult != '') { $resExport = $objCjwNLCsvExport->downloadCsvFile($listContentObjectId); } else { return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel'); } } else { return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel'); } }
$strPreviewCsvData = $objCjwNLCsvPreview->CsvResult; } /** * Actions */ // cancel if ($http->hasPostVariable('CancelButton')) { $csvFilePath = ''; return $module->redirectToView('subscription_list', array($nodeId)); } elseif ($http->hasPostVariable('ExportButton')) { $exportCsvFile = true; /** * Export */ // fetch data $arrCsvData = getDataForCsv($listContentObjectId); // export data in csv format for download in webbrowser $objCjwNLCsvExport = new CjwNewsletterCsvExport($arrCsvData, $delimiter, $arrDisplayItems); // write csv string => $objCjwNLCsvExport->CsvResult $resWrite = $objCjwNLCsvExport->writeCsv(); // create download csv file if ($objCjwNLCsvExport->CsvResult != '') { $resExport = $objCjwNLCsvExport->downloadCsvFile($listContentObjectId); } else { return $module->handleError(eZError::KERNEL_ACCESS_DENIED, 'kernel'); } } $viewParameters = array('offset' => 0, 'namefilter' => ''); $userParameters = $Params['UserParameters']; $viewParameters = array_merge($viewParameters, $userParameters); $tpl = templateInit();