Exemple #1
0
$collections = eZPersistentObject::fetchObjectList(eZInformationCollection::definition(), null, $conditions, false, false);
// TODO: change error handler
if (!$collections) {
    return $module->handleError(EZ_ERROR_KERNEL_NOT_AVAILABLE, 'kernel');
}
$counter = 0;
$attributesToExport = array();
while (true) {
    $currentattribute = $http->postVariable("field_{$counter}");
    if (!$currentattribute) {
        break;
    }
    $attributesToExport[] = $currentattribute;
    $counter++;
}
if ($http->hasPostVariable("creation_date")) {
    $exportCreationDate = true;
}
if ($http->hasPostVariable("modification_date")) {
    $exportModificationDate = true;
}
$separationCharacter = $http->postVariable("separation_char");
$exportFormat = $http->postVariable("export_type");
$filename = bccieExportUtils::getFileName($exportFormat, $object);
$parser = new Parser($objectID);
$export_string = $parser->exportInformationCollection($collections, $attributesToExport, $separationCharacter, $exportFormat, $dateConditions['days'], $exportCreationDate, $exportModificationDate);
$exportFormatOutputHandler = bccieExportFormatOutputHandler::instance();
$exportFormatOutputHandler->setOutputFileName($filename);
$exportFormatOutputHandler = $exportFormatOutputHandler->output($export_string);
flush();
eZExecution::cleanExit();
 public function setOutputCharset($charset)
 {
     self::$outputCharset = $charset;
 }