function _batch_needs_update

Same name in other branches
  1. 9 core/includes/batch.inc \_batch_needs_update()
  2. 10 core/includes/batch.inc \_batch_needs_update()
  3. 11.x 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

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.