function _filefield_content_generate in FileField 6.3
Private function used by filefield_content_generate().
1 call to _filefield_content_generate()
- filefield_content_generate in ./
filefield.module - Implementation of CCK's hook_content_generate(). Used by generate.module.
1 string reference to '_filefield_content_generate'
- filefield_content_generate in ./
filefield.module - Implementation of CCK's hook_content_generate(). Used by generate.module.
File
- ./
filefield.devel.inc, line 12 - Utility functions for generating FileField content. Note that image generation support requires the GD toolkit.
Code
function _filefield_content_generate($node, $field) {
if ($source = _filefield_generate_file($field)) {
$file = field_file_save_file($source, array(), filefield_widget_file_path($field));
$item = (array) $file;
$item['list'] = 1;
$item['data']['alt'] = devel_create_greeking(4);
$item['data']['title'] = devel_create_greeking(10);
}
else {
$item = array();
}
return $item;
}