function batch_test_stack
Same name in other branches
- 7.x modules/simpletest/tests/batch_test.module \batch_test_stack()
- 9 core/modules/system/tests/modules/batch_test/batch_test.module \batch_test_stack()
- 10 core/modules/system/tests/modules/batch_test/batch_test.module \batch_test_stack()
- 11.x core/modules/system/tests/modules/batch_test/batch_test.module \batch_test_stack()
Helper function: Stores or retrieves traced execution data.
30 calls to batch_test_stack()
- BatchTestChainedForm::batchTestChainedFormSubmit1 in core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestChainedForm.php - Form submission handler #1 for batch_test_chained_form
- BatchTestChainedForm::batchTestChainedFormSubmit2 in core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestChainedForm.php - Form submission handler #2 for batch_test_chained_form
- BatchTestChainedForm::batchTestChainedFormSubmit3 in core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestChainedForm.php - Form submission handler #3 for batch_test_chained_form
- BatchTestChainedForm::batchTestChainedFormSubmit4 in core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestChainedForm.php - Form submission handler #4 for batch_test_chained_form
- BatchTestController::testFinishRedirect in core/
modules/ system/ tests/ modules/ batch_test/ src/ Controller/ BatchTestController.php - Fires a batch process without a form submission and a finish redirect.
File
-
core/
modules/ system/ tests/ modules/ batch_test/ batch_test.module, line 249
Code
function batch_test_stack($data = NULL, $reset = FALSE) {
$state = \Drupal::state();
if ($reset) {
$state->delete('batch_test.stack');
}
if (!isset($data)) {
return $state->get('batch_test.stack');
}
$stack = $state->get('batch_test.stack');
$stack[] = $data;
$state->set('batch_test.stack', $stack);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.