function imagefield_field_formatter in ImageField 5
Same name and namespace in other branches
- 5.2 imagefield.module \imagefield_field_formatter()
Implementation of hook_field_formatter().
File
- ./
imagefield.module, line 577 - Defines an image field type. imagefield uses content.module to store the fid, and the drupal files table to store the actual file data.
Code
function imagefield_field_formatter($field, $item, $formatter) {
if (empty($item['fid'])) {
return '';
}
$file = _imagefield_file_load($item['fid']);
return theme('imagefield_image', $file, $item['alt'], $item['title']);
}