Merge pull request #18704 from mlutfy/partListingOutput
[civicrm-core.git] / CRM / Contact / BAO / Query.php
index 6f8c8fc893baf5d299bcfbb137558e7f7db23cbc..3fe9a97fc22241580994ed26bd2d46541be9cbb4 100644 (file)
@@ -6941,6 +6941,17 @@ AND   displayRelType.is_active = 1
     return $field;
   }
 
+  /**
+   * Get the field datatype, using the type in the database rather than the pseudofield, if a pseudofield.
+   *
+   * @param string $fieldName
+   *
+   * @return string
+   */
+  public function getDataTypeForRealField($fieldName) {
+    return CRM_Utils_Type::typeToString($this->getMetadataForRealField($fieldName)['type']);
+  }
+
   /**
    * If we have a field that is better rendered via the pseudoconstant handled them here.
    *