Documentation

CRM_Financial_BAO_ExportFormat_CSV extends CRM_Financial_BAO_ExportFormat
in package

Base class for Export Formats Create a subclass for a specific format.

Tags
link
http://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Specifications+-++Batches#CiviAccountsSpecifications-Batches-%C2%A0Overviewofimplementation

Table of Contents

Properties

$_batchIds  : string
BatchIds to be exported
$_downloadFile  : array<string|int, mixed>
Files to be downloaded
$_isDownloadFile  : bool
Download Exported file.
$complementaryTables  : array<string|int, mixed>
For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere.
$_exportParams  : array<string|int, mixed>
data which the individual export formats will output in the desired format.
$_template  : CRM_Core_Smarty
smarty template.

Methods

__construct()  : mixed
Class constructor.
assign()  : mixed
createActivityExport()  : mixed
createZip()  : bool
export()  : mixed
Override to assemble the appropriate subset of financial data for the specific export format.
exportACCNT()  : mixed
exportCUST()  : mixed
exportTRANS()  : mixed
format()  : null
formatHeaders()  : array<string|int, mixed>
Format table headers.
generateExportQuery()  : object
getFileExtension()  : string
Returns some kind of identification for your export format.
getMimeType()  : string
getTemplate()  : object
initiateDownload()  : mixed
makeExport()  : mixed
Generate CSV array for export.
output()  : mixed
Exports sbatches in $this->_batchIds, and saves to file.
putFile()  : string

Properties

$_batchIds

BatchIds to be exported

public string $_batchIds

$_downloadFile

Files to be downloaded

public array<string|int, mixed> $_downloadFile

$_isDownloadFile

Download Exported file.

public bool $_isDownloadFile

$complementaryTables

For this phase, we always output these records too so that there isn't data referenced in the journal entries that isn't defined anywhere.

public static array<string|int, mixed> $complementaryTables = ['ACCNT', 'CUST']

Possibly in the future this could be selected by the user.

$_exportParams

data which the individual export formats will output in the desired format.

protected array<string|int, mixed> $_exportParams

Methods

__construct()

Class constructor.

public __construct() : mixed

assign()

public assign(mixed $var[, null $value = NULL ]) : mixed
Parameters
$var : mixed
$value : null = NULL

createActivityExport()

public static createActivityExport(mixed $batchIds, string $fileName) : mixed
Parameters
$batchIds : mixed
$fileName : string
Tags
throws
CRM_Core_Exception

createZip()

public createZip([array<string|int, mixed> $files = [] ][, string $destination = NULL ][, bool $overwrite = FALSE ]) : bool
Parameters
$files : array<string|int, mixed> = []
$destination : string = NULL
$overwrite : bool = FALSE
Return values
bool

export()

Override to assemble the appropriate subset of financial data for the specific export format.

public export(array<string|int, mixed> $exportParams) : mixed
Parameters
$exportParams : array<string|int, mixed>

exportACCNT()

public exportACCNT() : mixed

exportCUST()

public exportCUST() : mixed

exportTRANS()

public exportTRANS() : mixed

format()

public static format(mixed $s[, string $type = 'string' ]) : null
Parameters
$s : mixed
$type : string = 'string'
Return values
null

formatHeaders()

Format table headers.

public formatHeaders(array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

generateExportQuery()

public generateExportQuery(int $batchId) : object
Parameters
$batchId : int
Return values
object

getFileExtension()

Returns some kind of identification for your export format.

public getFileExtension() : string
Return values
string

getMimeType()

public getMimeType() : string
Return values
string

getTemplate()

public static & getTemplate() : object
Return values
object

makeExport()

Generate CSV array for export.

public makeExport(array<string|int, mixed> $export) : mixed
Parameters
$export : array<string|int, mixed>

output()

Exports sbatches in $this->_batchIds, and saves to file.

public output([string $fileName = NULL ]) : mixed
Parameters
$fileName : string = NULL
  • use this file name (if applicable)

putFile()

public putFile(array<string|int, mixed> $export) : string
Parameters
$export : array<string|int, mixed>
Return values
string

        
On this page

Search results