function _batch_needs_update in Drupal 9
Same name and namespace in other branches
- 8 core/includes/batch.inc \_batch_needs_update()
Checks whether the batch information needs to be updated in the storage.
Parameters
bool $new_value: (optional) A new value to set.
Return value
bool TRUE if the batch information needs to be updated; FALSE otherwise.
3 calls to _batch_needs_update()
- BatchKernelTest::testNeedsUpdate in core/
tests/ Drupal/ KernelTests/ Core/ Batch/ BatchKernelTest.php - Tests _batch_needs_update().
- _batch_page in core/
includes/ batch.inc - Renders the batch processing page based on the current state of the batch.
- _batch_shutdown in core/
includes/ batch.inc - Shutdown function: Stores the current batch data for the next request.
File
- core/
includes/ batch.inc, line 119 - Batch processing API for processes to run in multiple HTTP requests.
Code
function _batch_needs_update($new_value = NULL) {
$needs_update =& drupal_static(__FUNCTION__, FALSE);
if (isset($new_value)) {
$needs_update = $new_value;
}
return $needs_update;
}