You are here

function deploy_services_deploy in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 modules/deploy_services/deploy_services.services.inc \deploy_services_deploy()

Services deploy action callback.

Parameters

$name: The name of the plan to retrieve.

Return value

TRUE on success, Exception on error or FALSE if the plan is not found.

1 string reference to 'deploy_services_deploy'
deploy_services_services_resources in modules/deploy_services/deploy_services.services.inc
Implements hook_services_resources().

File

modules/deploy_services/deploy_services.services.inc, line 201
Deploy Services module services functions.

Code

function deploy_services_deploy($name) {
  $plan = deploy_plan_load($name);
  if (!$plan) {
    return services_error(t('Not Found'), 404, t("Plan '@plan' not found", array(
      '@plan' => $plan,
    )));
  }
  try {
    $plan
      ->deploy();
  } catch (Exception $e) {
    return services_error(t('Internal Server Error'), 500, $e
      ->getMessage());
  }
  return TRUE;
}