Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. form.inc

function batch_get

Retrieves the current batch.

Related topics

Batch operations
Creates and processes batch operations.
16 calls to batch_get()
authorize.php in core/authorize.php
Administrative script for running authorized file operations.
BatchController::batchPageTitle in core/modules/system/src/Controller/BatchController.php
The _title_callback for the system.batch_page.html route.
BatchNegotiator::determineActiveTheme in core/modules/system/src/Theme/BatchNegotiator.php
Determine the active theme for the request.
batch_process in core/includes/form.inc
Processes the batch.
batch_set in core/includes/form.inc
Adds a new batch.

... See full list

File

core/includes/form.inc, line 985

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;
}
RSS feed
Powered by Drupal