function theme_field_object_label in Corresponding Entity References 7.3
Renders a human-readable label for a field instance, including the entity type and (if applicable) bundle that hosts it.
1 theme call to theme_field_object_label()
- field_object_field_formatter_view in field_object/
field_object.module - Implements hook_field_formatter_view().
File
- field_object/
field_object.module, line 95
Code
function theme_field_object_label(array $variables) {
$instance = $variables['instance'];
$output = '';
if ($instance['entity_type'] != 'field_collection_item') {
$entity_type = entity_get_info($instance['entity_type']);
$output = $entity_type['label'] . ' » ';
if ($entity_type['entity keys']['bundle']) {
$output .= $entity_type['bundles'][$instance['bundle']]['label'] . ' » ';
}
}
return $output . $instance['label'];
}