function batch_get
Same name and namespace in other branches
- 8.9.x core/includes/form.inc \batch_get()
- 10 core/includes/form.inc \batch_get()
- 11.x core/includes/form.inc \batch_get()
Retrieves the current batch.
Related topics
10 calls to batch_get()
- batch_process in core/
includes/ form.inc - Processes the batch.
- batch_set in core/
includes/ form.inc - Adds a new batch.
- install_run_task in core/
includes/ install.core.inc - Runs an individual installation task.
- _batch_current_set in core/
includes/ batch.inc - Returns the batch set being currently processed.
- _batch_finished in core/
includes/ batch.inc - Ends the batch processing.
File
-
core/
includes/ form.inc, line 963
Code
function &batch_get() {
// Not drupal_static(), because Batch API operates at a lower level than most
// use-cases for resetting static variables, and we specifically do not want a
// global drupal_static_reset() resetting the batch information. Functions
// that are part of the Batch API and need to reset the batch information may
// call batch_get() and manipulate the result by reference. Functions that are
// not part of the Batch API can also do this, but shouldn't.
static $batch = [];
return $batch;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.