class CRM_Financial_BAO_ExportFormat

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

Properties

protected array $_exportParams data which the individual export formats will output in the desired format.
static protected CRM_Core_Smarty $_template smarty template.

Methods

__construct()

Class constructor.

mixed
export(array $exportParams)

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

output(string $fileName = NULL)

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

makeExport($exportDaos)

Abstract function that generates exports, and downloads them as zip file.

string
getMimeType()

No description

string
getFileExtension()

Returns some kind of identification for your export format.

static object
getTemplate()

No description

assign($var, null $value = NULL)

No description

static null
format($s, string $type = 'string')

No description

initiateDownload()

No description

static 
createActivityExport($batchIds, string $fileName)

No description

bool
createZip(array $files = array(), null $destination = NULL, bool $overwrite = FALSE)

No description

Details

at line 56
__construct()

Class constructor.

at line 68
mixed export(array $exportParams)

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

Parameters

array $exportParams

Return Value

mixed

at line 78
output(string $fileName = NULL)

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

Parameters

string $fileName
  • use this file name (if applicable)

at line 88
abstract makeExport($exportDaos)

Abstract function that generates exports, and downloads them as zip file.

Parameters

$exportDaos array with DAO's for queries to be exported.

at line 93
string getMimeType()

Return Value

string

at line 105
abstract string getFileExtension()

Returns some kind of identification for your export format.

This does not really has to be a file extension, you can name your file as you wish as you override output.

Return Value

string

at line 110
static object getTemplate()

Return Value

object

at line 118
assign($var, null $value = NULL)

Parameters

$var
null $value

at line 134
static null format($s, string $type = 'string')

Parameters

$s
string $type

Return Value

null

at line 143
initiateDownload()

at line 177
static createActivityExport($batchIds, string $fileName)

Parameters

$batchIds
string $fileName

Exceptions

CRM_Core_Exception

at line 229
bool createZip(array $files = array(), null $destination = NULL, bool $overwrite = FALSE)

Parameters

array $files
null $destination
bool $overwrite

Return Value

bool