Skip to content

Commit

Permalink
[dev/core#457] Add $ids to hook_civicrm_export
Browse files Browse the repository at this point in the history
  • Loading branch information
scardinius committed Oct 25, 2018
1 parent df466fe commit a09323e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CRM/Export/BAO/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public static function exportComponents(
}

// call export hook
CRM_Utils_Hook::export($exportTempTable, $headerRows, $sqlColumns, $exportMode);
CRM_Utils_Hook::export($exportTempTable, $headerRows, $sqlColumns, $exportMode, $componentTable, $ids);

// In order to be able to write a unit test against this function we need to suppress
// the csv writing. In future hopefully the csv writing & the main processing will be in separate functions.
Expand Down
11 changes: 8 additions & 3 deletions CRM/Utils/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -1263,12 +1263,17 @@ public static function notePrivacy(&$noteValues) {
* SQL columns.
* @param int $exportMode
* Export mode ( contact, contribution, etc...).
* @param string $componentTable
* Name of temporary table
* @param array $ids
* Array of object's ids
*
* @return mixed
*/
public static function export(&$exportTempTable, &$headerRows, &$sqlColumns, &$exportMode) {
return self::singleton()->invoke(array('exportTempTable', 'headerRows', 'sqlColumns', 'exportMode'), $exportTempTable, $headerRows, $sqlColumns, $exportMode,
self::$_nullObject, self::$_nullObject,
public static function export(&$exportTempTable, &$headerRows, &$sqlColumns, &$exportMode, &$componentTable, &$ids) {
return self::singleton()->invoke(array('exportTempTable', 'headerRows', 'sqlColumns', 'exportMode', 'componentTable', 'ids'),
$exportTempTable, $headerRows, $sqlColumns,
$exportMode, $componentTable, $ids,
'civicrm_export'
);
}
Expand Down

0 comments on commit a09323e

Please sign in to comment.