function Utils::wf_crm_get_field in Webform CiviCRM Integration 8.5
Get a field based on its short or full name
Parameters
string $key:
Return value
array|null
Overrides UtilsInterface::wf_crm_get_field
File
- src/
Utils.php, line 496 - Webform CiviCRM module's common utility functions.
Class
Namespace
Drupal\webform_civicrmCode
function wf_crm_get_field($key) {
$fields = $this
->wf_crm_get_fields();
if (isset($fields[$key])) {
return $fields[$key];
}
if ($pieces = $this
->wf_crm_explode_key($key)) {
list(, , , , $table, $name) = $pieces;
if (isset($fields[$table . '_' . $name])) {
return $fields[$table . '_' . $name];
}
}
}