You are here

function file_entity_field_formatter_settings_summary in D7 Media 7

Implements hook_field_formatter_settings_summary().

File

file_entity/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;
}