function tripal_entity_label

3.x tripal.entities.api.inc tripal_entity_label($entity)

Define the entity label callback. This will return the title.

Parameters

$entity:

Return value

mixed

Related topics

1 string reference to 'tripal_entity_label'
tripal_entity_info in tripal/includes/tripal.entity.inc
Implement hook_entity_info().

File

tripal/api/tripal.entities.api.inc, line 1203
Provides an application programming interface (API) for working with TripalEntity content types (bundles) and their entities.

Code

function tripal_entity_label($entity) {
  if (property_exists($entity, 'title')) {
    return $entity->title;
  }
  return NULL;
}