Documentation

CRM_Export_BAO_Export
in package

This class contains the functions for Component export

Table of Contents

Constants

EXPORT_ROW_COUNT  = 100000

Methods

exportComponents()  : mixed
Get the list the export fields.
getComponents()  : mixed
Returns a list of exportable entities and their associated component.
invoke()  : mixed
Handle import error file creation.
writeDetailsToTable()  : mixed
buildRelatedContactArray()  : mixed
getIDsForRelatedContact()  : array<string|int, mixed>
Get the ids that we want to get related contact details for.

Constants

EXPORT_ROW_COUNT

public mixed EXPORT_ROW_COUNT = 100000

Methods

exportComponents()

Get the list the export fields.

public static exportComponents(int $selectAll, array<string|int, mixed> $ids, array<string|int, mixed> $params[, string $order = NULL ][, array<string|int, mixed> $fields = NULL ][, array<string|int, mixed> $moreReturnProperties = NULL ][, int $exportMode = CRM_Export_Form_Select::CONTACT_EXPORT ][, string $componentClause = NULL ][, string $componentTable = NULL ][, bool $mergeSameAddress = FALSE ][, bool $mergeSameHousehold = FALSE ][, array<string|int, mixed> $exportParams = [] ][, string $queryOperator = 'AND' ]) : mixed
Parameters
$selectAll : int

User preference while export.

$ids : array<string|int, mixed>

Contact ids.

$params : array<string|int, mixed>

Associated array of fields.

$order : string = NULL

Order by clause.

$fields : array<string|int, mixed> = NULL

Associated array of fields.

$moreReturnProperties : array<string|int, mixed> = NULL

Additional return fields.

$exportMode : int = CRM_Export_Form_Select::CONTACT_EXPORT

Export mode.

$componentClause : string = NULL

Component clause.

$componentTable : string = NULL

Component table.

$mergeSameAddress : bool = FALSE

Merge records if they have same address.

$mergeSameHousehold : bool = FALSE

Merge records if they belong to the same household.

$exportParams : array<string|int, mixed> = []
$queryOperator : string = 'AND'
Tags
throws
CRM_Core_Exception

getComponents()

Returns a list of exportable entities and their associated component.

public static getComponents() : mixed

Note: Some entities like Contact & Activity are not in components, so the export form seems to fudge things and accept the entity name instead of component name in those cases.

TODO: Hardcoded list bad. Needs to support extension export pages.

invoke()

Handle import error file creation.

public static invoke() : mixed

getIDsForRelatedContact()

Get the ids that we want to get related contact details for.

protected static getIDsForRelatedContact(array<string|int, mixed> $ids, int $exportMode) : array<string|int, mixed>
Parameters
$ids : array<string|int, mixed>
$exportMode : int
Return values
array<string|int, mixed>

        
On this page

Search results