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