You are here

function multifield_field_formatter_settings_summary in Multifield 7

Same name and namespace in other branches
  1. 7.2 multifield.field.inc \multifield_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary().

File

./multifield.field.inc, line 842
Field integration for the Multifield module.

Code

function multifield_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $entity_info = entity_get_info('multifield');
  $view_mode_label = $settings['view_mode'] == 'default' ? t('Default') : $entity_info['view modes'][$settings['view_mode']]['label'];
  $summary = t('View mode: @view-mode', array(
    '@view-mode' => $view_mode_label,
  ));
  return $summary;
}