public function ReadinessValidationManager::getResults in Automatic Updates 8.2
Gets the validation results from the last run.
Parameters
int|null $severity: (optional) The severity for the results to return. Should be one of the SystemManager::REQUIREMENT_* constants.
Return value
\Drupal\automatic_updates\Validation\ValidationResult[]| The validation result objects or NULL if no results are available or if the stored results are no longer valid.
See also
1 call to ReadinessValidationManager::getResults()
- ReadinessValidationManager::runIfNoStoredResults in src/
Validation/ ReadinessValidationManager.php - Dispatches the readiness check event if there no stored valid results.
File
- src/
Validation/ ReadinessValidationManager.php, line 156
Class
- ReadinessValidationManager
- Defines a manager to run readiness validation.
Namespace
Drupal\automatic_updates\ValidationCode
public function getResults(?int $severity = NULL) : ?array {
$results = $this
->getStoredValidResults();
if ($results !== NULL) {
if ($severity !== NULL) {
$results = array_filter($results, function ($result) use ($severity) {
return $result
->getSeverity() === $severity;
});
}
return $results;
}
return NULL;
}