You are here

function deploy_get_operation_info in Deploy - Content Staging 7.3

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

Helper function to get operation info.

1 call to deploy_get_operation_info()
DeployPlan::deploy in includes/DeployPlan.inc
Deploy the plan.

File

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

Code

function deploy_get_operation_info($event_name = NULL) {
  $cache =& drupal_static(__FUNCTION__);
  if (empty($cache)) {
    $operations = module_invoke_all('deploy_operation_info');
    foreach (array(
      'preprocess',
      'postprocess',
    ) as $event) {

      // Avoid empty keys.
      if (!isset($operations[$event])) {
        $operations[$event] = array();
      }
    }
    $cache = $operations;
  }
  if (!empty($event_name)) {
    return $cache[$event_name];
  }
  return $cache;
}