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
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
writeDetailsToTable()
public
static writeDetailsToTable(CRM_Export_BAO_ExportProcessor $processor, mixed $details) : mixed
Parameters
- $processor : CRM_Export_BAO_ExportProcessor
- $details : mixed
buildRelatedContactArray()
protected
static buildRelatedContactArray(mixed $selectAll, mixed $ids, CRM_Export_BAO_ExportProcessor $processor, mixed $componentTable) : mixed
Parameters
- $selectAll : mixed
- $ids : mixed
- $processor : CRM_Export_BAO_ExportProcessor
- $componentTable : 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