function filefield_uuid_node_features_export_render_alter in UUID Features Integration 7
Same name and namespace in other branches
- 6 includes/modules/filefield.inc \filefield_uuid_node_features_export_render_alter()
Implements hook_uuid_node_features_export_render_alter().
File
- includes/
modules/ filefield.inc, line 44 - uuid_node hooks on behalf of the filefield module.
Code
function filefield_uuid_node_features_export_render_alter(&$export, $node, $module) {
$types = content_types();
if (!empty($types[$node->type])) {
// Find CCK filefields.
foreach ($types[$node->type]['fields'] as $field) {
if ($field['module'] == 'filefield') {
$field_name = $field['field_name'];
$export->{$field_name} = array();
// Loop through all values of the field.
foreach ($node->{$field_name} as $delta => $data) {
if (!empty($data['fid'])) {
$export->{$field_name}[$delta] = array(
'uuid' => uuid_get_uuid('files', 'fid', $data['fid']),
'list' => $data['list'],
'data' => $data['data'],
);
}
}
}
}
}
}