BatchStorageInterface

Defines a common interface for batch storage operations. Hierarchy interface \Drupal\Core\Batch\BatchStorageInterface File core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 8 Namespace Drupal\Core\Batch Members Name Modifiers Type Description BatchStorageInterface::cleanup public function Cleans up failed or old batches. BatchStorageInterface::create public function Creates and saves a batch. BatchStorageInterface::delete public function Deletes

BatchStorageInterface::create

public BatchStorageInterface::create(array $batch) Creates and saves a batch. Parameters array $batch: The array representing the batch to create. File core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 27 Class BatchStorageInterface Defines a common interface for batch storage operations. Namespace Drupal\Core\Batch Code public function create(array $batch);

BatchStorageInterface::cleanup

public BatchStorageInterface::cleanup() Cleans up failed or old batches. File core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 48 Class BatchStorageInterface Defines a common interface for batch storage operations. Namespace Drupal\Core\Batch Code public function cleanup();

BatchStorageInterface::load

public BatchStorageInterface::load($id) Loads a batch. Parameters int $id: The ID of the batch to load. Return value array An array representing the batch, or FALSE if no batch was found. File core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 19 Class BatchStorageInterface Defines a common interface for batch storage operations. Namespace Drupal\Core\Batch Code public function load($id);

BatchStorageInterface::delete

public BatchStorageInterface::delete($id) Deletes a batch. Parameters int $id: The ID of the batch to delete. File core/lib/Drupal/Core/Batch/BatchStorageInterface.php, line 43 Class BatchStorageInterface Defines a common interface for batch storage operations. Namespace Drupal\Core\Batch Code public function delete($id);

BatchStorage::doCreate

protected BatchStorage::doCreate(array $batch) Saves a batch. Parameters array $batch: The array representing the batch to create. File core/lib/Drupal/Core/Batch/BatchStorage.php, line 151 Class BatchStorage Namespace Drupal\Core\Batch Code protected function doCreate(array $batch) { $this->connection->insert('batch') ->fields(array( 'bid' => $batch['id'], 'timestamp' => REQUEST_TIME, 'token' => $this->csrfToken->get($batch['id']),

BatchStorage::ensureTableExists

protected BatchStorage::ensureTableExists() Check if the table exists and create it if not. File core/lib/Drupal/Core/Batch/BatchStorage.php, line 165 Class BatchStorage Namespace Drupal\Core\Batch Code protected function ensureTableExists() { try { $database_schema = $this->connection->schema(); if (!$database_schema->tableExists(static::TABLE_NAME)) { $schema_definition = $this->schemaDefinition(); $database_schema->createTable(static::TABLE_NAME

BatchStorage::load

public BatchStorage::load($id) Loads a batch. Parameters int $id: The ID of the batch to load. Return value array An array representing the batch, or FALSE if no batch was found. Overrides BatchStorageInterface::load File core/lib/Drupal/Core/Batch/BatchStorage.php, line 57 Class BatchStorage Namespace Drupal\Core\Batch Code public function load($id) { // Ensure that a session is started before using the CSRF token generator. $this->session->start(); try { $batch = $

BatchStorage::schemaDefinition

public BatchStorage::schemaDefinition() Defines the schema for the batch table. File core/lib/Drupal/Core/Batch/BatchStorage.php, line 204 Class BatchStorage Namespace Drupal\Core\Batch Code public function schemaDefinition() { return [ 'description' => 'Stores details about batches (processes that run in multiple HTTP requests).', 'fields' => [ 'bid' => [ 'description' => 'Primary Key: Unique batch ID.', // This is not a serial column, to a

BatchStorage::TABLE_NAME

The table name. File core/lib/Drupal/Core/Batch/BatchStorage.php, line 15 Class BatchStorage Namespace Drupal\Core\Batch Code const TABLE_NAME = 'batch';