$this->_mapperKeys = $mapperKeys;
}
+ /**
+ * Get information about the provided job.
+ * - name
+ * - id (generally the same as name)
+ * - label
+ *
+ * e.g. ['activity_import' => ['id' => 'activity_import', 'label' => ts('Activity Import'), 'name' => 'activity_import']]
+ *
+ * @return array
+ */
+ public static function getUserJobInfo(): array {
+ return [
+ 'contribution_import' => [
+ 'id' => 'contribution_import',
+ 'name' => 'contribution_import',
+ 'label' => ts('Contribution Import'),
+ ],
+ ];
+ }
+
/**
* Contribution-specific result codes
* @see CRM_Import_Parser result code constants
$error = $this->checkContactDuplicate($paramValues);
if (CRM_Core_Error::isAPIError($error, CRM_Core_ERROR::DUPLICATE_CONTACT)) {
- $matchedIDs = explode(',', $error['error_message']['params'][0]);
+ $matchedIDs = (array) $error['error_message']['params'];
if (count($matchedIDs) > 1) {
throw new CRM_Core_Exception('Multiple matching contact records detected for this row. The contribution was not imported', CRM_Import_Parser::ERROR);
}
$error = $this->checkContactDuplicate($params);
if (isset($error['error_message']['params'][0])) {
- $matchedIDs = explode(',', $error['error_message']['params'][0]);
+ $matchedIDs = (array) $error['error_message']['params'];
// check if only one contact is found
if (count($matchedIDs) > 1) {