You are here

function filehash_field_formatter_settings_summary in File Hash 7

Implements hook_field_formatter_settings_summary().

File

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

Code

function filehash_field_formatter_settings_summary($field, $instance, $view_mode) {
  $algos = filehash_names();
  if (isset($algos[$instance['display'][$view_mode]['settings']['algo']])) {
    return t('@algo hash', array(
      '@algo' => $algos[$instance['display'][$view_mode]['settings']['algo']],
    ));
  }
}