You are here

public function deploy_ui_plan::deploy_page in Deploy - Content Staging 7.3

Same name and namespace in other branches
  1. 7.2 modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php \deploy_ui_plan::deploy_page()

Renders the deployment plan page.

File

modules/deploy_ui/plugins/export_ui/deploy_ui_plan.class.php, line 376
Deploy UI for managing deployment plans.

Class

deploy_ui_plan
CTools Export UI class for deployment plans.

Code

public function deploy_page($js, $input, $plan) {
  $form_state = array(
    'plugin' => $this->plugin,
    'object' => &$this,
    'ajax' => $js,
    'plan' => $plan,
    'rerender' => TRUE,
    'no_redirect' => TRUE,
  );
  $output = drupal_build_form('deploy_ui_plan_confirm_form', $form_state);
  if (!empty($form_state['executed'])) {
    try {
      $plan
        ->deploy();
    } catch (Exception $e) {
      drupal_set_message(t('Something went wrong during the deployment. Check your logs or the status of the deployment for more information.'), 'error');
    }
    drupal_goto('admin/structure/deploy/plans/list/' . $plan->name);
  }
  return $output;
}