You are here

function media_field_formatter_view in D7 Media 7.4

Same name and namespace in other branches
  1. 7 includes/media.fields.inc \media_field_formatter_view()
  2. 7.2 includes/media.fields.inc \media_field_formatter_view()
  3. 7.3 includes/media.fields.inc \media_field_formatter_view()

Implements hook_field_formatter_view().

Legacy support for the "Large filetype icon" file field formatter.

See also

media_field_formatter_info()

File

includes/media.fields.inc, line 736
Provide media selector widget and media field formatters to the fields API.

Code

function media_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  if ($display['type'] == 'media_large_icon') {
    foreach ($items as $delta => $item) {
      $element[$delta] = array(
        '#theme' => 'media_formatter_large_icon',
        '#file' => (object) $item,
        '#style_name' => $display['settings']['image_style'],
      );
    }
  }
  return $element;
}