_batch_finished

function _batch_finished

_batch_finished()

Ends the batch processing.

Call the 'finished' callback of each batch set to allow custom handling of the results and resolve page redirection.

File

core/includes/batch.inc, line 400
Batch processing API for processes to run in multiple HTTP requests.

Code

function _batch_finished() {
  $batch = &batch_get();
  $batch_finished_redirect = NULL;

  // Execute the 'finished' callbacks for each batch set, if defined.
  foreach ($batch['sets'] as $batch_set) {
    if (isset($batch_set['finished'])) {
      // Check if the set requires an additional file for function definitions.
      if (isset($batch_set['file']) && is_file($batch_set['file'])) {
        include_once \Drupal::root() . '/' . $batch_set['file'];