You are here

function content_copy_deploy in Deploy - Content Staging 6

Same name and namespace in other branches
  1. 5 content_copy_deploy/content_copy_deploy.module \content_copy_deploy()

Deploy content deployment 'hook'.

File

modules/content_copy_deploy/content_copy_deploy.module, line 47

Code

function content_copy_deploy($content_type) {
  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);
  return deploy_send(array(
    'content_copy.import',
  ), array(
    $content_type,
    $export,
  ));
}