You are here

function deploy_plan_save in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 deploy.module \deploy_plan_save()

Writes a deployment plan.

4 calls to deploy_plan_save()
deploy_adhoc_plan_create in modules/deploy_adhoc_plan/deploy_adhoc_plan.module
Helper function to create ad hoc plan if default is defined.
deploy_services_create in modules/deploy_services/deploy_services.services.inc
Services create operation callback.
deploy_services_update in modules/deploy_services/deploy_services.services.inc
Services update operation callback.
drush_deploy_create_plan in ./deploy.drush.inc
Command callback for creating plans.

File

./deploy.module, line 430
Deploy module functions.

Code

function deploy_plan_save($data) {
  $plan = new DeployPlan();
  foreach ($data as $key => $value) {
    $plan->{$key} = $value;
  }
  $returned = ctools_export_crud_save('deploy_plans', $plan);
  if (SAVED_NEW !== $returned && SAVED_UPDATED !== $returned) {
    throw new DeployPlanException('Failed to create plan.');
  }
  return $plan;
}