You are here

function baguettebox_field_formatter_settings_summary in baguetteBox.js 7

Implements hook_field_formatter_settings_summary().

File

./baguettebox.module, line 102
Primary hooks for baguettebox module.

Code

function baguettebox_field_formatter_settings_summary($field, $instance, $view_mode) {
  $settings = $instance['display'][$view_mode]['settings'];
  $image_styles = image_style_options(FALSE, PASS_THROUGH);
  $initial_image_style = isset($image_styles[$settings['initial_image_style']]) ? $image_styles[$settings['initial_image_style']] : t('Original image');
  $summary[] = t('Initial image style: %style', array(
    '%style' => $initial_image_style,
  ));
  $baguettebox_image_style = isset($image_styles[$settings['baguettebox_image_style']]) ? $image_styles[$settings['baguettebox_image_style']] : t('Original image');
  $summary[] = t('Baguettebox image style: %style', array(
    '%style' => $baguettebox_image_style,
  ));
  $summary[] = t('Animation: %animation', array(
    '%animation' => $settings['animation'],
  ));
  return implode('<br/>', $summary);
}