You are here

interface BatchStorageInterface in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Batch/BatchStorageInterface.php \Drupal\Core\Batch\BatchStorageInterface
  2. 10 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

1 file declares its use of BatchStorageInterface
BatchNegotiator.php in core/modules/system/src/Theme/BatchNegotiator.php

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

Namesort descending Modifiers Type Description 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