interface BatchStorageInterface

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Batch/BatchStorageInterface.php \Drupal\Core\Batch\BatchStorageInterface
  2. 8.9.x core/lib/Drupal/Core/Batch/BatchStorageInterface.php \Drupal\Core\Batch\BatchStorageInterface
  3. 11.x core/lib/Drupal/Core/Batch/BatchStorageInterface.php \Drupal\Core\Batch\BatchStorageInterface

Defines a common interface for batch storage operations.

Hierarchy

Expanded class hierarchy of BatchStorageInterface

All classes that implement BatchStorageInterface

4 files declare their use of BatchStorageInterface
BatchController.php in core/modules/system/src/Controller/BatchController.php
BatchControllerTest.php in core/modules/system/tests/src/Unit/Batch/BatchControllerTest.php
BatchNegotiator.php in core/modules/system/src/Theme/BatchNegotiator.php
form.inc in core/includes/form.inc
Functions for form and batch generation and processing.

File

core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 8

Namespace

Drupal\Core\Batch
View source
interface BatchStorageInterface {
  
  /**
   * Loads a batch.
   *
   * @param int $id
   *   The ID of the batch to load.
   *
   * @return array
   *   An array representing the batch, or FALSE if no batch was found.
   */
  public function load($id);
  
  /**
   * Creates and saves a batch.
   *
   * @param array $batch
   *   The array representing the batch to create.
   */
  public function create(array $batch);
  
  /**
   * Updates a batch.
   *
   * @param array $batch
   *   The array representing the batch to update.
   */
  public function update(array $batch);
  
  /**
   * Deletes a batch.
   *
   * @param int $id
   *   The ID of the batch to delete.
   */
  public function delete($id);
  
  /**
   * Cleans up failed or old batches.
   */
  public function cleanup();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
BatchStorageInterface::cleanup public function Cleans up failed or old batches. 2
BatchStorageInterface::create public function Creates and saves a batch. 2
BatchStorageInterface::delete public function Deletes a batch. 2
BatchStorageInterface::load public function Loads a batch. 2
BatchStorageInterface::update public function Updates a batch. 2

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