Use function to get contactTypes instead of hardcoded list
authorColeman Watts <coleman@civicrm.org>
Sun, 7 Jul 2019 01:12:26 +0000 (21:12 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 10 Jul 2019 19:37:14 +0000 (15:37 -0400)
CRM/Core/BAO/Mapping.php

index a171aaeffcec2b3256c7e59332a65bb6bc90e750..20155af9933e78788dd37c3f3077b414b58214c6 100644 (file)
@@ -751,7 +751,7 @@ class CRM_Core_BAO_Mapping extends CRM_Core_DAO_Mapping {
    * @return array
    */
   public static function getBasicFields($mappingType) {
-    $contactTypes = ['Individual', 'Household', 'Organization'];
+    $contactTypes = CRM_Contact_BAO_ContactType::basicTypes();
     $fields = [];
     foreach ($contactTypes as $contactType) {
       if ($mappingType == 'Search Builder') {