You are here

function field_entity_field_instance_entity_label in Field entity 7

Entity label callback for field instance entity.

1 string reference to 'field_entity_field_instance_entity_label'
field_entity_entity_info in ./field_entity.module
Implements hook_entity_info().

File

./field_entity.module, line 101
Field and Field Instance entity definitions.

Code

function field_entity_field_instance_entity_label($entity, $entity_type) {
  $instance = field_info_instance($entity->entity_type, $entity->field_name, $entity->bundle);
  return isset($instance['label']) ? $instance['label'] . ' (' . $entity->field_name . ')' : $entity->field_name;
}