function _batch_do

Same name and namespace in other branches
  1. 7.x includes/batch.inc \_batch_do()
  2. 9 core/includes/batch.inc \_batch_do()
  3. 8.9.x core/includes/batch.inc \_batch_do()
  4. 10 core/includes/batch.inc \_batch_do()

Does one execution pass with JavaScript and returns progress to the browser.

See also

_batch_progress_page_js()

_batch_process()

1 call to _batch_do()
_batch_page in core/includes/batch.inc
Renders the batch processing page based on the current state of the batch.

File

core/includes/batch.inc, line 136

Code

function _batch_do() {
    // Perform actual processing.
    [
        $percentage,
        $message,
        $label,
    ] = _batch_process();
    return new JsonResponse([
        'status' => TRUE,
        'percentage' => $percentage,
        'message' => $message,
        'label' => $label,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.