You are here

function file_entity_field_formatter_settings_summary in File Entity (fieldable files) 7

Same name and namespace in other branches
  1. 7.3 file_entity.field.inc \file_entity_field_formatter_settings_summary()
  2. 7.2 file_entity.field.inc \file_entity_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary().

File

./file_entity.field.inc, line 45
Field API integration for the file_entity module.

Code

function file_entity_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = NULL;
  if ($display['type'] === 'file_rendered') {
    $view_mode_label = file_entity_view_mode_label($settings['file_view_mode'], t('Unknown'));
    $summary = t('View mode: %mode', array(
      '%mode' => $view_mode_label,
    ));
  }
  return $summary;
}