function _security_review_batch_run_op in Security Review 8
Batch operation: runs a single check.
Parameters
\Drupal\security_review\Check $check: The check to run.
array $context: The Batch context.
1 string reference to '_security_review_batch_run_op'
- RunForm::submitForm in src/
Form/ RunForm.php - Form submission handler.
File
- ./
security_review.module, line 180 - Site security review and reporting Drupal module.
Code
function _security_review_batch_run_op(Check $check, array &$context) {
// Inform the user about the progress.
$context['message'] = $check
->getTitle();
// Run the check.
$results = Drupal::service('security_review.checklist')
->runChecks([
$check,
]);
// Store the results.
$context['results'] = array_merge($context['results'], $results);
}