function pdf_reader_field_formatter_view in PDF Reader 7
Same name and namespace in other branches
- 7.2 pdf_reader.module \pdf_reader_field_formatter_view()
Implements hook_field_formatter_view().
File
- ./
pdf_reader.module, line 122 - pdf reader module file.
Code
function pdf_reader_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$settings = $display['settings'];
$element = array();
switch ($display['type']) {
case 'pdf_reader_file':
foreach ($items as $delta => $item) {
$element[$delta]['#type'] = 'markup';
$element[$delta]['#markup'] = theme('pdf_reader', array(
'file' => $item,
'settings' => $settings,
));
}
break;
}
return $element;
}