You are here

function availability_calendar_field_formatter_settings_summary in Availability Calendars 7.3

Same name and namespace in other branches
  1. 7.5 availability_calendar.field.inc \availability_calendar_field_formatter_settings_summary()
  2. 7.4 availability_calendar.field.inc \availability_calendar_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary(). @link http://api.drupal.org/api/drupal/modules--field_ui--field_ui.api.php/fun...

File

./availability_calendar.field.inc, line 420
Availability Calendar module. Defines an availability calendar field.

Code

function availability_calendar_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = array();
  $summary[] = format_plural($settings['show_number_of_months'], 'Show 1 month', 'Show @count months');
  if ($display['type'] == 'availability_calendar_viewport') {
    $summary[] = format_plural($settings['viewport']['rows'], 'in a viewport of @horizontal by 1 month', 'in a viewport of @horizontal by @count months', array(
      '@horizontal' => $settings['viewport']['cols'],
    ));
  }
  return implode(' ', $summary);
}