function ds_entity_view_modes in Display Suite 7.2
Same name and namespace in other branches
- 7 ds.module \ds_entity_view_modes()
Get entity view modes.
Parameters
$entity_type: The name of the entity type.
7 calls to ds_entity_view_modes()
- ds_devel_render_object in modules/
ds_devel/ ds_devel.module - Renders the markup of a node in HTML entities.
- ds_edit_view_mode_form_validate in modules/
ds_ui/ includes/ ds.view_modes.inc - Validates the view mode submission form generated by ds_edit_view_mode_form().
- ds_extras_ds_field_settings_form in modules/
ds_extras/ includes/ ds_extras.admin.inc - Implements hook_ds_field_settings_form().
- ds_extras_get_bundle_view_modes in modules/
ds_extras/ ds_extras.module - Get view modes for an entity bundle.
- ds_field_formatter_settings_form in includes/
ds.field_ui.inc - Implements hook_field_formatter_settings_form().
File
- ./
ds.module, line 191 - Display Suite core functions.
Code
function ds_entity_view_modes($entity_type = NULL) {
if (!empty($entity_type)) {
switch ($entity_type) {
// For taxonomy terms the base table and the entity type are different
case 'taxonomy_term_data':
$entity_info = entity_get_info('taxonomy_term');
break;
default:
$entity_info = entity_get_info($entity_type);
break;
}
return $entity_info['view modes'];
}
}