You are here

public static function BatchProcessor::finishStage in Automatic Updates 8.2

Finishes the stage batch job.

Parameters

bool $success: Indicate that the batch API tasks were all completed successfully.

array $results: An array of all the results.

array $operations: A list of the operations that had not been completed by the batch API.

File

src/BatchProcessor.php, line 137

Class

BatchProcessor
A batch processor for updates.

Namespace

Drupal\automatic_updates

Code

public static function finishStage(bool $success, array $results, array $operations) : ?RedirectResponse {
  if ($success) {
    return new RedirectResponse(Url::fromRoute('automatic_updates.confirmation_page', [], [
      'absolute' => TRUE,
    ])
      ->toString());
  }
  static::handleBatchError($results);
  return NULL;
}