You are here

function filehash_field_formatter_view in File Hash 7

Implements hook_field_formatter_view().

File

./filehash.module, line 248
Generate hashes for each uploaded file.

Code

function filehash_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  if (!empty($items)) {
    $element[0] = array(
      '#theme' => 'filehash_table',
      '#items' => $items,
      '#settings' => $display['settings'],
    );
  }
  return $element;
}