Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function _batch_shutdown

Same name and namespace in other branches
  1. 11.x core/includes/batch.inc \_batch_shutdown()
  2. 10 core/includes/batch.inc \_batch_shutdown()
  3. 9 core/includes/batch.inc \_batch_shutdown()
  4. 8.9.x core/includes/batch.inc \_batch_shutdown()

Shutdown function: Stores the current batch data for the next request.

See also

_batch_page()

drupal_register_shutdown_function()

1 string reference to '_batch_shutdown'
_batch_page in includes/batch.inc
Renders the batch processing page based on the current state of the batch.

File

includes/batch.inc, line 490

Code

function _batch_shutdown () {
 if ($batch = batch_get ()) {
 db_update ('batch')->fields (array(
 'batch' => serialize ($batch),
 ))
 ->condition ('bid', $batch['id'])
 ->execute ();
 }
}

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