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

Breadcrumb

  1. Drupal Core 11.1.x

BatchStorageInterface.php

Namespace

Drupal\Core\Batch

File

core/lib/Drupal/Core/Batch/BatchStorageInterface.php

View source
<?php

namespace Drupal\Core\Batch;


/**
 * Defines a common interface for batch storage operations.
 */
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();

}

Interfaces

Title Deprecated Summary
BatchStorageInterface Defines a common interface for batch storage operations.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal