You are here

function deploy_plan_load_all_enabled in Deploy - Content Staging 7.2

Same name and namespace in other branches
  1. 7.3 deploy.module \deploy_plan_load_all_enabled()

Loader callback for all enabled deployment plans.

2 calls to deploy_plan_load_all_enabled()
deploy_manager_plan_get_options in ./deploy.manager.inc
Options callback for the deploy_plan data type.
deploy_ui_overview_page in modules/deploy_ui/deploy_ui.pages.inc
Page callback for the overview page.

File

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

Code

function deploy_plan_load_all_enabled($args = array()) {
  $type = !empty($args) ? 'conditions' : 'all';
  ctools_include('export');
  $enabled_plans = array();
  $all_plans = ctools_export_load_object('deploy_plans', $type, $args);
  if (isset($all_plans)) {

    // Load each plan's configuration into itself.
    foreach ($all_plans as $plan) {
      if (!empty($plan->disabled)) {
        continue;
      }
      $plan
        ->load();
      $enabled_plans[$plan->name] = $plan;
    }
    return $enabled_plans;
  }
}