batch_get

Versions
6 – 7
&batch_get()

Retrieves the current batch.

Related topics

▾ 14 functions call batch_get()

batch_process in includes/form.inc
Processes the batch.
batch_set in includes/form.inc
Opens a new batch.
drupal_process_form in includes/form.inc
Processes a form submission.
form_execute_handlers in includes/form.inc
A helper function used to execute custom validation and submission handlers for a given form. Button-specific handlers are checked first. If none exist, the function falls back to form-level handlers.
install_run_task in ./install.php
Run an individual installation task.
_batch_current_set in includes/batch.inc
Return the batch set being currently processed.
_batch_finished in includes/batch.inc
End the batch processing.
_batch_next_set in includes/batch.inc
Retrieve the next set in a batch.
_batch_page in includes/batch.inc
State-based dispatcher for the batch processing page.
_batch_process in includes/batch.inc
Process sets in a batch.
_batch_progress_page_js in includes/batch.inc
Output a batch processing page with JavaScript support.
_batch_progress_page_nojs in includes/batch.inc
Output a batch processing page without JavaScript support.
_batch_shutdown in includes/batch.inc
Shutdown function; store the current batch data for the next request.
_system_batch_theme in modules/system/system.module
Theme callback for the default batch page.

Code

includes/form.inc, line 3194

<?php
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 = array();
  return $batch;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.