abstract 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.
bool $_isDownloadFile Download Exported file.

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 = [], null $destination = NULL, bool $overwrite = FALSE)

No description

Details

at line 62
__construct()

Class constructor.

at line 74
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 84
output(string $fileName = NULL)

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

Parameters

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

at line 94
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 99
string getMimeType()

Return Value

string

at line 111
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 116
static object getTemplate()

Return Value

object

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

Parameters

$var
null $value

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

Parameters

$s
string $type

Return Value

null

at line 150
initiateDownload()

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

Parameters

$batchIds
string $fileName

Exceptions

CRM_Core_Exception

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

Parameters

array $files
null $destination
bool $overwrite

Return Value

bool