function wf_crm_display_name in Webform CiviCRM Integration 7.3
Same name and namespace in other branches
- 7.5 includes/utils.inc \wf_crm_display_name()
- 7.4 includes/utils.inc \wf_crm_display_name()
Fetch contact display name
Parameters
$cid: Contact id
Return value
string
4 calls to wf_crm_display_name()
- theme_webform_civicrm_components_form in ./
webform_civicrm_admin.inc - Theme override for webform components form.
- _webform_csv_data_civicrm_contact in ./
contact_component.inc - Implements _webform_csv_data_component().
- _webform_display_civicrm_contact in ./
contact_component.inc - Implements _webform_display_component().
- _webform_table_civicrm_contact in ./
contact_component.inc - Implements _webform_table_component().
File
- ./
webform_civicrm_utils.inc, line 1187 - Webform CiviCRM module's common utility functions.
Code
function wf_crm_display_name($cid) {
if (!$cid || !is_numeric($cid)) {
return '';
}
civicrm_initialize();
$result = wf_civicrm_api('contact', 'get', array(
'id' => $cid,
'return.display_name' => 1,
'is_deleted' => 0,
));
return check_plain(wf_crm_aval($result, "values:{$cid}:display_name", ''));
}