Returns the render array for the provided entities.
array $entities: The entities to be rendered, must be of the same type.
string $view_mode: The view mode that should be used to display the entity.
string $langcode: (optional) For which language the entity should be rendered, defaults to the current content language.
array A render array for the entities, indexed by the same keys as the entities array passed in $entities.
function entity_view_multiple(array $entities, $view_mode, $langcode = NULL) {
return entity_render_controller(reset($entities)
->entityType())
->viewMultiple($entities, $view_mode, $langcode);
}