CRM_Financial_BAO_ExportFormat
in package
AbstractYes
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.
- $_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.
- format() : null
- getFileExtension() : string
- Returns some kind of identification for your export format.
- 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.
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
$_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>
format()
public
static format(mixed $s[, string $type = 'string' ]) : null
Parameters
- $s : mixed
- $type : string = 'string'
Return values
nullgetFileExtension()
Returns some kind of identification for your export format.
public
abstract getFileExtension() : string
This does not really has to be a file extension, you can name your file as you wish as you override output.
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
abstract makeExport(array<string|int, mixed> $exportDaos) : mixed
Parameters
- $exportDaos : array<string|int, mixed>
-
with DAO's for queries to be exported.
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)