function entity_metadata_view_single in Entity API 7
Callback to view an entity, for which just ENTITYTYPE_view() is available.
1 string reference to 'entity_metadata_view_single'
- _entity_info_add_metadata in ./
entity.module - Adds metadata and callbacks for core entities to the entity info.
File
- modules/
callbacks.inc, line 989 - Provides various callbacks for the whole core module integration.
Code
function entity_metadata_view_single($entities, $view_mode, $langcode, $entity_type) {
$function = $entity_type . '_view';
$build = array();
foreach ($entities as $key => $entity) {
$build[$entity_type][$key] = $function($entity, $view_mode, $langcode);
}
return $build;
}