function content_copy_service_export in Deploy - Content Staging 5
Same name and namespace in other branches
- 6 services/content_copy_service/content_copy_service.inc \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.module, line 85
Code
function content_copy_service_export($type_name) {
if (!array_key_exists($type_name, node_get_types())) {
return services_error("Content type {$type_name} does not exist");
}
$groups = array();
if (module_exists('fieldgroup')) {
$groups = content_copy_groups($type_name);
}
$fields = content_copy_fields($type_name);
$fields = array_keys($fields);
$values = array(
'type_name' => $type_name,
'groups' => $groups,
'fields' => $fields,
);
$retval = content_copy_export('content_copy_export_form', $values);
watchdog("services", "Content Copy Export Service run for content type {$type_name}.");
return $retval;
}