You are here

function hacked_build_report_batch_finished in Hacked! 8.2

Same name and namespace in other branches
  1. 6.2 hacked.report.inc \hacked_build_report_batch_finished()
  2. 7.2 hacked.report.inc \hacked_build_report_batch_finished()

Completion callback for the report batch.

Parameters

$success:

$results:

1 string reference to 'hacked_build_report_batch_finished'
HackedController::getProjectData in src/Controller/HackedController.php
Compute the report data for hacked.

File

./hacked.report.inc, line 30

Code

function hacked_build_report_batch_finished($success, $results) {
  if ($success) {

    // Sort the results.
    usort($results['report'], '_hacked_project_report_sort_by_status');

    // Store them.
    \Drupal::cache(HACKED_CACHE_TABLE)
      ->set('hacked:full-report', $results['report'], strtotime('+1 day'));
    \Drupal::state()
      ->set('hacked.last_check', time());
  }
}