protected function BatchStorage::doCreate in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::doCreate()
- 9 core/lib/Drupal/Core/Batch/BatchStorage.php \Drupal\Core\Batch\BatchStorage::doCreate()
Saves a batch.
Parameters
array $batch: The array representing the batch to create.
File
- core/
lib/ Drupal/ Core/ Batch/ BatchStorage.php, line 151
Class
Namespace
Drupal\Core\BatchCode
protected function doCreate(array $batch) {
$this->connection
->insert('batch')
->fields([
'bid' => $batch['id'],
'timestamp' => REQUEST_TIME,
'token' => $this->csrfToken
->get($batch['id']),
'batch' => serialize($batch),
])
->execute();
}