You are here

function _optimizedb_list_tables_operation_execute_finished in OptimizeDB 8

Same name and namespace in other branches
  1. 6 optimizedb.module \_optimizedb_list_tables_operation_execute_finished()
  2. 7 optimizedb.module \_optimizedb_list_tables_operation_execute_finished()

Output results when a batch is complete.

Callback for batch_set().

Parameters

bool $success: A boolean indicating whether the batch operation successfully concluded.

int $results: The results from the batch process.

array $operations: The batch operations that remained unprocessed. Only relevant if $success is FALSE.

1 string reference to '_optimizedb_list_tables_operation_execute_finished'
_optimizedb_list_tables_operation_execute in ./optimizedb.module
Performing operations on tables.

File

./optimizedb.module, line 143
Database Optimization.

Code

function _optimizedb_list_tables_operation_execute_finished($success, $results, array $operations) {
  if ($success) {
    if (isset($results['errors'])) {
      $result = $results['errors'];
    }
    else {
      $result = [];
    }
    $_SESSION['optimizedb_list_tables_operations'] = $result;
  }
  else {
    \Drupal::messenger()
      ->addError(t('Completed with errors.'));
  }
}