You are here

function redhen_contact_property_full_name_get in RedHen CRM 7

Callback to get $contact->full_name.

1 string reference to 'redhen_contact_property_full_name_get'
RedhenContactMetadataController::entityPropertyInfo in modules/redhen_contact/lib/redhen_contact.metadata.inc
Overrides entityPropertyInfo().

File

modules/redhen_contact/redhen_contact.module, line 1412
Module file for RedHen contacts.

Code

function redhen_contact_property_full_name_get(RedhenContact $contact, array $options, $property_name, $entity_type) {
  $name = $contact->first_name . (empty($contact->middle_name) ? '' : ' ') . $contact->middle_name . (empty($contact->first_name) ? '' : ' ') . $contact->last_name;
  drupal_alter('redhen_contact_name', $name, $contact);
  return $name;
}