function imagefield_widget in ImageField 5.2
Same name and namespace in other branches
- 5 imagefield.module \imagefield_widget()
- 6.3 imagefield.module \imagefield_widget()
Implementation of hook_widget().
File
- ./
imagefield.module, line 568 - 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_widget($op, &$node, $field, &$items) {
switch ($op) {
case 'default value':
return array();
case 'prepare form values':
_imagefield_widget_prepare_form_values($node, $field, $items);
return;
case 'form':
return _imagefield_widget_form($node, $field, $items);
case 'validate':
_imagefield_widget_validate($node, $field, $items);
return;
}
}