From e6a94a9864ab2eb41def978494bd482e11388a57 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 17 Jul 2019 15:51:58 +1200 Subject: [PATCH] Remove deprecated componentPaymentFields function --- CRM/Core/BAO/Mapping.php | 8 +++++++- CRM/Export/BAO/Export.php | 22 ---------------------- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/CRM/Core/BAO/Mapping.php b/CRM/Core/BAO/Mapping.php index 6bbae9ef08..404d0ffcfb 100644 --- a/CRM/Core/BAO/Mapping.php +++ b/CRM/Core/BAO/Mapping.php @@ -869,7 +869,13 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping { // @todo - review this - inconsistent with other entities & hacky. if ($exportMode == CRM_Export_Form_Select::EVENT_EXPORT) { $componentPaymentFields = []; - foreach (CRM_Export_BAO_Export::componentPaymentFields() as $payField => $payTitle) { + foreach ([ + 'componentPaymentField_total_amount' => ts('Total Amount'), + 'componentPaymentField_contribution_status' => ts('Contribution Status'), + 'componentPaymentField_received_date' => ts('Date Received'), + 'componentPaymentField_payment_instrument' => ts('Payment Method'), + 'componentPaymentField_transaction_id' => ts('Transaction ID'), + ] as $payField => $payTitle) { $componentPaymentFields[$payField] = ['title' => $payTitle]; } $fields['Participant'] = array_merge($fields['Participant'], $componentPaymentFields); diff --git a/CRM/Export/BAO/Export.php b/CRM/Export/BAO/Export.php index 61d1ca5395..b4535d947f 100644 --- a/CRM/Export/BAO/Export.php +++ b/CRM/Export/BAO/Export.php @@ -451,28 +451,6 @@ LIMIT $offset, $limit } } - /** - * Build componentPayment fields. - * - * This is no longer used by export but BAO_Mapping still calls it & we - * should find a generic way to handle this or move this to that class. - * - * @deprecated - */ - public static function componentPaymentFields() { - static $componentPaymentFields; - if (!isset($componentPaymentFields)) { - $componentPaymentFields = [ - 'componentPaymentField_total_amount' => ts('Total Amount'), - 'componentPaymentField_contribution_status' => ts('Contribution Status'), - 'componentPaymentField_received_date' => ts('Date Received'), - 'componentPaymentField_payment_instrument' => ts('Payment Method'), - 'componentPaymentField_transaction_id' => ts('Transaction ID'), - ]; - } - return $componentPaymentFields; - } - /** * Get the values of linked household contact. * -- 2.25.1