* @static
*/
public static function get($daoName, $fieldName, $params = array()) {
+ $flip = !empty($params['flip']);
+
+ // Custom fields are not in the schema
+ if (strpos($fieldName, 'custom') === 0) {
+ $dao = new CRM_Core_DAO_CustomField;
+ $dao->id = (int) substr($fieldName, 7);
+ $dao->find(TRUE);
+ $customField = (array) $dao;
+ $dao->free();
+ $output = array();
+ CRM_Core_BAO_CustomField::buildOption($customField, $output);
+ return $flip ? array_flip($output) : $output;
+ }
+
+ // Core field: load schema
$dao = new $daoName;
$fields = $dao->fields();
$fieldKeys = $dao->fieldKeys();
return FALSE;
}
$fieldSpec = $fields[$fieldKey];
- $flip = !empty($params['flip']);
// If the field is an enum, explode the enum definition and return the array.
if (isset($fieldSpec['enumValues'])) {
}
/**
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
* Get all active payment processors
*
* The static array paymentProcessor is returned
}
/**
- * Get all active payment processors
+ * DEPRECATED. Please use the buildOptions() method in the appropriate BAO object.
*
* The static array paymentProcessorType is returned
*