CRM_Financial_BAO_ExportFormat_IIF
extends CRM_Financial_BAO_ExportFormat
in package
Base class for Export Formats Create a subclass for a specific format.
Tags
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.
- $SEPARATOR : string
- Tab character. Some people's editors replace tabs with spaces so I'm scared to use actual tabs.
- $_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() : bool|mixed|string
- formatMoney() : mixed|string
- Format money.
- generateExportQuery() : object
- getFileExtension() : string
- Returns some kind of identification for your export format.
- getHookedTemplateFileName() : string
- getMimeType() : string
- getTemplate() : object
- initiateDownload() : mixed
- makeExport() : mixed
- Abstract function that generates exports, and downloads them as zip file.
- 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.
$SEPARATOR
Tab character. Some people's editors replace tabs with spaces so I'm scared to use actual tabs.
public
static string
$SEPARATOR
Can't set it here using chr() because static. Same thing if a const. So it's set in constructor.
$_exportParams
data which the individual export formats will output in the desired format.
protected
array<string|int, mixed>
$_exportParams
$_template
smarty template.
protected
static CRM_Core_Smarty
$_template
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
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
boolexport()
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(string $s[, string $type = 'string' ]) : bool|mixed|string
Parameters
- $s : string
-
the input string
- $type : string = 'string'
-
type can be string, date, or notepad
Return values
bool|mixed|stringformatMoney()
Format money.
public
formatMoney(float $amount) : mixed|string
Parameters
- $amount : float
Return values
mixed|stringgenerateExportQuery()
public
generateExportQuery(int $batchId) : object
Parameters
- $batchId : int
Return values
objectgetFileExtension()
Returns some kind of identification for your export format.
public
getFileExtension() : string
Return values
stringgetHookedTemplateFileName()
public
getHookedTemplateFileName() : string
Return values
stringgetMimeType()
public
getMimeType() : string
Return values
stringgetTemplate()
public
static & getTemplate() : object
Return values
objectinitiateDownload()
public
initiateDownload() : mixed
makeExport()
Abstract function that generates exports, and downloads them as zip file.
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([null $fileName = NULL ]) : mixed
Parameters
- $fileName : null = NULL
putFile()
public
putFile(string $out) : string
Parameters
- $out : string