You are here

function file_entity_view_mode_label in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 8.2 file_entity.module \file_entity_view_mode_label()
  2. 7.3 file_entity.module \file_entity_view_mode_label()
  3. 7 file_entity.module \file_entity_view_mode_label()

Return the label for a specific file entity view mode.

2 calls to file_entity_view_mode_label()
file_entity_field_formatter_settings_summary in ./file_entity.field.inc
Implements hook_field_formatter_settings_summary().
views_plugin_row_file_view::summary_title in views/views_plugin_row_file_view.inc
Returns the summary of the settings in the display.

File

./file_entity.module, line 1646
Extends Drupal file entities to be fieldable and viewable.

Code

function file_entity_view_mode_label($view_mode, $default = FALSE) {
  $labels = file_entity_view_mode_labels();
  return isset($labels[$view_mode]) ? $labels[$view_mode] : $default;
}