From 83078312b2bd1cd3a5cd3d23b7fc98ddf98bd396 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 3 Jun 2022 18:44:33 +1200 Subject: [PATCH] Move setImportStatus to parent m --- CRM/Contact/Import/Parser/Contact.php | 18 ------------------ CRM/Import/Parser.php | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 8bfdd3fe1d..198dba14ae 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -1357,24 +1357,6 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Import_Parser { fclose($fd); } - /** - * Update the status of the import row to reflect the processing outcome. - * - * @param int $id - * @param string $status - * @param string $message - * @param int|null $entityID - * Optional created entity ID - * @param array $relatedEntityIDs - * Optional array e.g ['related_contact' => 4] - * - * @throws \API_Exception - * @throws \CRM_Core_Exception - */ - public function setImportStatus(int $id, string $status, string $message, ?int $entityID = NULL, array $relatedEntityIDs = []): void { - $this->getDataSourceObject()->updateStatus($id, $status, $message, $entityID, $relatedEntityIDs); - } - /** * Format contact parameters. * diff --git a/CRM/Import/Parser.php b/CRM/Import/Parser.php index 5a08ade2f3..8a12340f48 100644 --- a/CRM/Import/Parser.php +++ b/CRM/Import/Parser.php @@ -1608,7 +1608,6 @@ abstract class CRM_Import_Parser { return !empty($this->ambiguousOptions[$fieldName][mb_strtolower($importedValue)]); } - /** * Get the civicrm_mapping_field appropriate layout for the mapper input. * @@ -1727,4 +1726,20 @@ abstract class CRM_Import_Parser { return $subTypes; } + /** + * Update the status of the import row to reflect the processing outcome. + * + * @param int $id + * @param string $status + * @param string $message + * @param int|null $entityID + * Optional created entity ID + * + * @throws \API_Exception + * @throws \CRM_Core_Exception + */ + protected function setImportStatus(int $id, string $status, string $message, ?int $entityID = NULL): void { + $this->getDataSourceObject()->updateStatus($id, $status, $message, $entityID); + } + } -- 2.25.1