You are here

function cloud_zoom_field_formatter_settings_summary in Cloud Zoom 7

Same name and namespace in other branches
  1. 8 cloud_zoom.module \cloud_zoom_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary().

File

./cloud_zoom.module, line 421
This module integrates the Cloud Zoom JQuery library from: http://www.professorcloud.com/mainsite/cloud-zoom.htm

Code

function cloud_zoom_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $cloud_zoom_settings = cloud_zoom_settings_info();
  $summary = array();
  foreach ($cloud_zoom_settings as $key => $info) {
    $summary_info = !empty($info['fieldset']) ? $settings[$info['fieldset']][$key] : $settings[$key];
    $summary_info = $info['form_type'] == 'fieldset' ? '' : $summary_info;
    $title = $info['form_type'] == 'fieldset' ? '<strong>' . $info['title'] . '</strong>' : $info['title'] . ' : ';
    $summary[] = $title . $summary_info;
  }
  return implode('<br />', $summary);
}