function content_copy_service_export in Deploy - Content Staging 6
Same name and namespace in other branches
- 5 services/content_copy_service/content_copy_service.module \content_copy_service_export()
Content copy export service callback
1 string reference to 'content_copy_service_export'
- content_copy_service_service in services/
content_copy_service/ content_copy_service.module - Implementation of hook_service()
File
- services/
content_copy_service/ content_copy_service.inc, line 37 - Link CCK content copy functionality to services module.
Code
function content_copy_service_export($type_name) {
if (!content_copy_content_type_exists($type_name)) {
return services_error("Content type {$type_name} does not exist");
}
if (module_exists('fieldgroup')) {
$groups = array_keys(fieldgroup_groups($content_type));
}
$fields = array_values(content_copy_fields($content_type));
$values = array(
'type_name' => $content_type,
'groups' => $groups,
'fields' => $fields,
);
$export = content_copy_export($values);
watchdog("services", "Content Copy Export Service run for content type {$type_name}.");
return $retval;
}