1 batch_test.module | batch_test_stack($data = NULL, $reset = FALSE) |
Helper function: store or retrieve traced execution data.
File
- core/
modules/ simpletest/ tests/ batch_test.module, line 507 - Helper module for the Batch API tests.
Code
function batch_test_stack($data = NULL, $reset = FALSE) {
if ($reset) {
state_del('batch_test_stack');
}
if (!isset($data)) {
return state_get('batch_test_stack', array());
}
$stack = state_get('batch_test_stack', array());
$stack[] = $data;
state_set('batch_test_stack', $stack);
}