You are here

public function DeployProcessorBatch::postProcess in Deploy - Content Staging 7.2

Same name and namespace in other branches
  1. 7.3 plugins/DeployProcessorBatch.inc \DeployProcessorBatch::postProcess()

Runs all postprocess operations.

Parameters

array $operations: An array of all operations to be run. Each operation contains a 'callback' key with the name of the function to be run. Each function should take the aggregator as an argument.

Overrides DeployProcessorMemory::postProcess

File

plugins/DeployProcessorBatch.inc, line 70
Batch API plugin for deploy Processor.

Class

DeployProcessorBatch
Processor class using the Batch API

Code

public function postProcess(array $operations = array()) {
  $this
    ->processOperations($operations);
  $batch = array(
    'title' => t('Deploying %plan', array(
      '%plan' => $this->aggregator->plan->title,
    )),
    'operations' => $this->operations,
    'finished' => 'deploy_batch_finished_operation',
  );
  batch_set($batch);
  if (drupal_is_cli() && function_exists('drush_main')) {

    // Drush has its own batch processor.
    $batch =& batch_get();
    $batch['progressive'] = FALSE;
    drush_backend_batch_process();
  }
  else {
    batch_process('admin/structure/deploy');
  }
}