1.20.x date.field.inc date_field_formatter_settings_summary($field, $instance, $view_mode)

Implements hook_field_formatter_settings_summary().

File

modules/date/date.field.inc, line 69
Field hooks to implement a date field.

Code

function date_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $formatter = $display['type'];
  module_load_include('inc', 'date', 'date.admin');
  switch ($formatter) {
    case 'format_interval':
      $summary = date_interval_formatter_settings_summary($field, $instance, $view_mode);
      break;

    default:
      $summary = date_default_formatter_settings_summary($field, $instance, $view_mode);
      break;
  }
  $context = array(
    'field' => $field,
    'instance' => $instance,
    'view_mode' => $view_mode,
  );
  backdrop_alter('date_field_formatter_settings_summary', $summary, $context);

  return implode('<br />', $summary);
}