function ds_entity_view_fallback in Display Suite 7.2
DS entity view callback.
Straight copy from Entity API module with fallback to Drupal core view callbacks for nodes, files and maybe others later.
1 call to ds_entity_view_fallback()
- ds_search_search_page in modules/
ds_search/ ds_search.module - Implements hook_search_page().
File
- modules/
ds_search/ ds_search.module, line 223 - Display Suite search.
Code
function ds_entity_view_fallback($entity_type, $entities, $view_mode = 'full', $langcode = NULL, $page = NULL) {
// Use the entity module in case it's enabled.
if (module_exists('entity')) {
return entity_view($entity_type, $entities, $view_mode, $langcode, $page);
}
else {
if ($entity_type == 'node') {
return node_view_multiple($entities, $view_mode);
}
elseif ($entity_type == 'file' && function_exists('file_view_multiple')) {
return file_view_multiple($entities, $view_mode);
}
}
}