public function BatchStorage::update

Updates a batch.

Parameters

array $batch: The array representing the batch to update.

Overrides BatchStorageInterface::update

File

drupal/core/lib/Drupal/Core/Utility/BatchStorage.php, line 49
Contains \Drupal\Core\Utility\BatchStorage.

Class

BatchStorage

Namespace

Drupal\Core\Utility

Code

public function update(array $batch) {
  $this->connection
    ->update('batch')
    ->fields(array(
    'batch' => serialize($batch),
  ))
    ->condition('bid', $batch['id'])
    ->execute();
}