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

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

BatchStorage::__construct

public BatchStorage::__construct(Connection $connection, SessionInterface $session, CsrfTokenGenerator $csrf_token) Constructs the database batch storage service. Parameters \Drupal\Core\Database\Connection $connection: The database connection. \Symfony\Component\HttpFoundation\Session\SessionInterface $session: The session. \Drupal\Core\Access\CsrfTokenGenerator $csrf_token: The CSRF token generator. File core/lib/Drupal/Core/Batch/BatchStorage.php, line 48 Class BatchStorage Namespac

BatchStorage::update

public BatchStorage::update(array $batch) Updates a batch. Parameters array $batch: The array representing the batch to update. Overrides BatchStorageInterface::update File core/lib/Drupal/Core/Batch/BatchStorage.php, line 93 Class BatchStorage Namespace Drupal\Core\Batch Code public function update(array $batch) { try { $this->connection->update('batch') ->fields(array('batch' => serialize($batch))) ->condition('bid', $batch['id']) ->execute

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';

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::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::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::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']),