+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CiviCRM_Hook
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
abstract class CRM_Utils_Hook {
* 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'
);
}
);
}
+ /**
+ * Check for duplicate contacts
+ *
+ * @param array $dedupeParams
+ * Array of params for finding duplicates: [
+ * '{parameters returned by CRM_Dedupe_Finder::formatParams}
+ * 'check_permission' => TRUE/FALSE;
+ * 'contact_type' => $contactType;
+ * 'rule' = $rule;
+ * 'rule_group_id' => $ruleGroupID;
+ * 'excludedContactIDs' => $excludedContactIDs;
+ * @param array $dedupeResults
+ * Array of results ['handled' => TRUE/FALSE, 'ids' => array of IDs of duplicate contacts]
+ * @param array $contextParams
+ * The context if relevant, eg. ['event_id' => X]
+ *
+ * @return mixed
+ */
+ public static function findDuplicates($dedupeParams, &$dedupeResults, $contextParams) {
+ return self::singleton()
+ ->invoke(array('dedupeParams', 'dedupeResults', 'contextParams'), $dedupeParams, $dedupeResults, $contextParams, self::$_nullObject, self::$_nullObject, self::$_nullObject, 'civicrm_findDuplicates');
+ }
+
/**
* This hook is called AFTER EACH email has been processed by the script bin/EmailProcessor.php
*
);
}
+ /**
+ * ALlow Extensions to custom process IPN hook data such as sending Google Analyitcs information based on the IPN
+ * @param array $IPNData - Array of IPN Data
+ * @return mixed
+ */
+ public static function postIPNProcess(&$IPNData) {
+ return self::singleton()->invoke(array('IPNData'),
+ $IPNData, self::$_nullObject, self::$_nullObject,
+ self::$_nullObject, self::$_nullObject, self::$_nullObject,
+ 'civicrm_postIPNProcess'
+ );
+ }
+
}