function linkimagefield_widget in Link Image Field 5
Same name and namespace in other branches
- 6 linkimagefield.module \linkimagefield_widget()
Implementation of hook_widget().
File
- ./
linkimagefield.module, line 365 - Defines an link image field type. linkimagefield uses content.module to store the fid, and the drupal files table to store the actual file data.
Code
function linkimagefield_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':
_linkimagefield_widget_prepare_form_values($node, $field, $node_field);
return;
case 'form':
$form = _linkimagefield_widget_form($node, $field, $node_field);
return $form;
case 'validate':
_linkimagefield_widget_form_validate($node, $field, $node_field);
return;
}
}