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']),
      'batch' => serialize($batch),
    ))
    ->execute();
}
doc_Drupal
2016-10-29 08:46:09
Comments
Leave a Comment

Please login to continue.