You are here

function deploy_plan_load_all_enabled in Deploy - Content Staging 7.3

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

Loader callback for all enabled deployment plans.

1 call to deploy_plan_load_all_enabled()
deploy_manager_plan_get_options in ./deploy.manager.inc
Options callback for the deploy_plan data type.

File

./deploy.module, line 341
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;
  }
}