Skip to content
Snippets Groups Projects
Unverified Commit 4f09abca authored by Tomasz Pietrzkowski's avatar Tomasz Pietrzkowski Committed by GitHub
Browse files

Update hook_civicrm_export

Describe new variables due to dev/core#457
parent ce47b0db
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ export.
## Availability
This hook was first available in CiviCRM 3.2.4
This hook was first available in CiviCRM 3.2.4, $componentTable and $ids variables are available in CiviCRM 5.8.0
## Definition
......@@ -19,14 +19,15 @@ This hook was first available in CiviCRM 3.2.4
used during export
- @param array $headerRows - header rows for output
- @param array $sqlColumns - SQL columns
- @param int $exportMode - export mode ( contact, contribution,
etc...)
- @param int $exportMode - export mode ( contact, contribution, etc...)
- @param string $componentTable - Name of temporary table
- @param array $ids - Array of object's ids
## Details
## Example
function civitest_civicrm_export( $exportTempTable, $headerRows, $sqlColumns, $exportMode ) {
function civitest_civicrm_export( $exportTempTable, $headerRows, $sqlColumns, $exportMode, $componentTable, $ids ) {
$writeHeader = true;
$offset = 0;
$limit = 200;
......@@ -68,7 +69,7 @@ This hook was first available in CiviCRM 3.2.4
Second example, adding columns to the export and leaving the export to do its thing
Note example above isn't using pass by reference on the fields and hence may have been that way
function civitest_civicrm_export ( $exportTempTable, &$headerRows, &$sqlColumns, $exportMode ) {
function civitest_civicrm_export ( $exportTempTable, &$headerRows, &$sqlColumns, $exportMode, $componentTable, $ids ) {
// Only want to do this for contribution export
if ($exportMode==2) {
......@@ -108,4 +109,4 @@ This hook was first available in CiviCRM 3.2.4
$sqlColumns['psf_nominal_code'] = 'psf_nominal_code varchar(255)';
$sqlColumns['psf_cost_centre'] = 'psf_cost_centre varchar(255)';
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment