You are here

function royalsliderfield_field_formatter_settings_summary in RoyalSlider Integration 7

Implements hook_field_formatter_settings_summary().

File

contrib/royalsliderfield/royalsliderfield.module, line 99
RoyalSlider Field module.

Code

function royalsliderfield_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  if ($display['type'] == 'royalsliderfields_formatter') {

    // TODO: Exclude disabled optionsets.
    $options = _royalslider_optionsets();
    if (isset($settings['royalslider_optionset'])) {
      return t('Optionset: @set', array(
        '@set' => $options[$settings['royalslider_optionset']],
      ));
    }
  }
  return '';
}