You are here

function rate_field_formatter_settings_summary in Rate 7.2

Implements hook_field_formatter_settings_summary().

File

./rate.module, line 287
Main module file for the Rate module.

Code

function rate_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  switch ($settings['displayed']) {
    case RATE_AVERAGE:
      return t('Average rating');
      break;
    case RATE_USER:
      return t('Users vote if available, empty otherwise');
      break;
    case RATE_USER_OR_AVERAGE:
      return t('Users vote if available, average otherwise');
      break;
  }
  return '';
}