csv_export_functions.php
Functions used (mostly) to generate the content needed for CSV files
Table of Contents
Functions
- generateResourcesMetadataCSV() : bool|void
- Generates the CSV content of the metadata for resources passed in the array The CSV is echoed to output for direct download or saved to a file
- generateNodesExport() : mixed
- Generates the file content when exporting nodes
Functions
generateResourcesMetadataCSV()
Generates the CSV content of the metadata for resources passed in the array The CSV is echoed to output for direct download or saved to a file
generateResourcesMetadataCSV(array<string|int, mixed> $resources[, bool $personal = false ][, bool $alldata = false ][, string $outputfile = "" ]) : bool|void
Parameters
- $resources : array<string|int, mixed>
-
array of resource ids to create a CSV for
- $personal : bool = false
-
flag to include only fields expected to include personal data
- $alldata : bool = false
-
flag to include extra data from the resource table
- $outputfile : string = ""
-
optional file path to output CSV to
Return values
bool|void —TRUE if the file has been created, void if the data has been sent as a direct download
generateNodesExport()
Generates the file content when exporting nodes
generateNodesExport(array<string|int, mixed> $field[, mixed $parent = null ][, bool $send_headers = false ]) : mixed
Parameters
- $field : array<string|int, mixed>
-
Array containing field information (as retrieved by get_field)
- $parent : mixed = null
- $send_headers : bool = false
-
If true, function sends headers used for downloading content. Default is set to false