function _batch_test_nested_batch_callback

Implements callback_batch_operation().

Performs a batch operation setting up its own batch(es).

2 string references to '_batch_test_nested_batch_callback'
_batch_test_batch_4 in core/modules/system/tests/modules/batch_test/batch_test.module
Batch 4: Performs a batch within a batch.
_batch_test_batch_7 in core/modules/system/tests/modules/batch_test/batch_test.module
Batch 7: Performs two batches within a batch.

File

core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc, line 124

Code

function _batch_test_nested_batch_callback(array $batches = []) {
  foreach ($batches as $batch) {
    batch_test_stack("setting up batch {$batch}");
    $function = '_batch_test_batch_' . $batch;
    batch_set($function());
  }
  \Drupal::state()->set('batch_test_nested_order_multiple_batches', batch_get());
}

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