function media_field_formatter_view in D7 Media 7.3
Same name and namespace in other branches
- 7.4 includes/media.fields.inc \media_field_formatter_view()
- 7 includes/media.fields.inc \media_field_formatter_view()
- 7.2 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
File
- includes/
media.fields.inc, line 710 - 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;
}