function crm_core_contact_get_primary_field_name in CRM Core 7
Get CRM Core Contact primary field name.
1 call to crm_core_contact_get_primary_field_name()
- crm_core_contact_get_primary_field_value in modules/
crm_core_contact/ crm_core_contact.module - Get CRM Core Contact primary field value.
File
- modules/
crm_core_contact/ crm_core_contact.module, line 160 - Provides default CRM Core Contact entities and the ability to create more.
Code
function crm_core_contact_get_primary_field_name(CRMCoreContactEntity $contact, $primary_field) {
$contact_type = crm_core_contact_type_load($contact->type);
return empty($contact_type->primary_fields[$primary_field]) ? '' : $contact_type->primary_fields[$primary_field];
}