function imagefield_field_settings in ImageField 5
Same name and namespace in other branches
- 5.2 imagefield.module \imagefield_field_settings()
Implementation of hook_field_settings().
File
- ./
imagefield.module, line 70 - 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_settings($op, $field) {
switch ($op) {
case 'form':
$form = array();
return $form;
case 'validate':
break;
case 'save':
return array();
case 'database columns':
$columns = array(
'fid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => '0',
),
'title' => array(
'type' => 'varchar',
length => 255,
'not null' => TRUE,
'default' => "''",
'sortable' => TRUE,
),
'alt' => array(
'type' => 'varchar',
length => 255,
'not null' => TRUE,
'default' => "''",
'sortable' => TRUE,
),
);
return $columns;
}
}