get a mapping with custom field names (eg. custom_21)
This commit is contained in:
parent
9e3ffbb43e
commit
746ed45f04
1 changed files with 19 additions and 0 deletions
|
@ -197,6 +197,25 @@ class CustomField {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a custom field mapping
|
||||
*
|
||||
* @return array
|
||||
* @throws \CiviCRM_API3_Exception
|
||||
*/
|
||||
public static function getMapping() {
|
||||
|
||||
$customFields = CustomField::fetch();
|
||||
$customFieldMapping = [];
|
||||
|
||||
foreach ($customFields as $customField) {
|
||||
$customFieldMapping[$customField->getName()] = 'custom_' . $customField->getId();
|
||||
}
|
||||
|
||||
return $customFieldMapping;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $custom_group_id
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue