Remove deprecated componentPaymentFields function
authoreileen <emcnaughton@wikimedia.org>
Wed, 17 Jul 2019 03:51:58 +0000 (15:51 +1200)
committereileen <emcnaughton@wikimedia.org>
Wed, 24 Jul 2019 05:41:19 +0000 (17:41 +1200)
CRM/Core/BAO/Mapping.php
CRM/Export/BAO/Export.php

index 6bbae9ef08570199407fd0504b0f2bbfc1c54f75..404d0ffcfb0d8bd0d3f9f414213750a0a3eace3e 100644 (file)
@@ -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);
index 61d1ca53958d53e7f7aafbaa20bb8edb0bee0118..b4535d947ffb81ae85c95856cb455d361bbf2af0 100644 (file)
@@ -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.
    *