private function ProjectSecurityRequirement::getVersionEndRequirement in Drupal 10
Same name and namespace in other branches
- 8 core/modules/update/src/ProjectSecurityRequirement.php \Drupal\update\ProjectSecurityRequirement::getVersionEndRequirement()
- 9 core/modules/update/src/ProjectSecurityRequirement.php \Drupal\update\ProjectSecurityRequirement::getVersionEndRequirement()
Gets the requirements based on security coverage until a specific version.
Return value
array Requirements array as specified by hook_requirements().
File
- core/
modules/ update/ src/ ProjectSecurityRequirement.php, line 135
Class
- ProjectSecurityRequirement
- Class for generating a project's security requirement.
Namespace
Drupal\updateCode
private function getVersionEndRequirement() {
$requirement = [];
if ($security_coverage_message = $this
->getVersionEndCoverageMessage()) {
$requirement['description'] = $security_coverage_message;
if ($this->securityCoverageInfo['additional_minors_coverage'] > 0) {
$requirement['value'] = $this
->t('Covered until @end_version', [
'@end_version' => $this->securityCoverageInfo['security_coverage_end_version'],
]);
$requirement['severity'] = $this->securityCoverageInfo['additional_minors_coverage'] > 1 ? REQUIREMENT_INFO : REQUIREMENT_WARNING;
}
else {
$requirement['value'] = $this
->t('Coverage has ended');
$requirement['severity'] = REQUIREMENT_ERROR;
}
}
return $requirement;
}