You are here

function pdf_reader_field_formatter_settings_summary in PDF Reader 7

Same name and namespace in other branches
  1. 7.2 pdf_reader.module \pdf_reader_field_formatter_settings_summary()

Implements hook_field_formatter_settings_summary().

File

./pdf_reader.module, line 103
pdf reader module file.

Code

function pdf_reader_field_formatter_settings_summary($field, $instance, $view_mode) {
  $renderers = array(
    'google' => 'Google Viewer',
    'direct' => 'Direct Embed',
    'pdf-js' => 'pdf.js',
  );
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $summary = 'Size: ' . $settings['pdf_width'] . 'x' . $settings['pdf_height'] . ' Using: ' . $renderers[$settings['renderer']] . '<br> Download Link: ' . ($settings['download'] == 1 ? 'YES' : 'NO') . ' Use colorbox: ' . ($settings['colorbox'] == 1 ? 'YES' : 'NO') . ' Colorbox link text: ' . $settings['colorbox_link_text'];
  return $summary;
}