function _batch_test_nested_batch_callback in Drupal 8
Same name and namespace in other branches
- 7 modules/simpletest/tests/batch_test.callbacks.inc \_batch_test_nested_batch_callback()
- 9 core/modules/system/tests/modules/batch_test/batch_test.callbacks.inc \_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 112 - Batch callbacks for the Batch API tests.
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());
}