function file_entity_metadata_view_file in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 file_entity.module \file_entity_metadata_view_file()
Entity API callback to view files.
1 string reference to 'file_entity_metadata_view_file'
- file_entity_entity_info_alter in ./
file_entity.module - Implements hook_entity_info_alter().
File
- ./
file_entity.module, line 1063 - Extends Drupal file entities to be fieldable and viewable.
Code
function file_entity_metadata_view_file($entities, $view_mode = 'full', $langcode = NULL) {
$result = file_view_multiple($entities, $view_mode, 0, $langcode);
// Make sure to key the result with 'file' instead of 'files'.
return array(
'file' => reset($result),
);
}