You are here

function _civicrm_entity_get_entity_label in CiviCRM Entity 7.2

Utility function to return an entity's label

Parameters

$entity_type:

$id:

Return value

mixed

1 call to _civicrm_entity_get_entity_label()
_civicrm_entity_render_fields in ./civicrm_entity.ds.inc
Default Display Suite Render handler for CiviCRM "fields".

File

./civicrm_entity.ds.inc, line 193

Code

function _civicrm_entity_get_entity_label($entity_type, $id) {
  if ($entity_type != 'civicrm_participant') {
    $wrapper = entity_metadata_wrapper($entity_type, $id);
    return $wrapper
      ->label();
  }
  else {
    return $id;
  }
}