You are here

function field_object_field_formatter_view in Corresponding Entity References 7.3

Implements hook_field_formatter_view().

File

field_object/field_object.module, line 68

Code

function field_object_field_formatter_view($entity_type, $entity, array $field, array $instance, $language, array $items, array $display) {
  $element = array();
  foreach ($items as $delta => $item) {
    $label = array();
    foreach (_field_object_expand_path($item['path']) as $field) {
      $label[] = theme('field_object_label', $field);
    }
    $element[$delta]['#markup'] = implode(' » ', $label);
  }
  return $element;
}