function ProjectSecurityRequirement::getRequirement
Same name in other branches
- 9 core/modules/update/src/ProjectSecurityRequirement.php \Drupal\update\ProjectSecurityRequirement::getRequirement()
- 10 core/modules/update/src/ProjectSecurityRequirement.php \Drupal\update\ProjectSecurityRequirement::getRequirement()
- 11.x core/modules/update/src/ProjectSecurityRequirement.php \Drupal\update\ProjectSecurityRequirement::getRequirement()
Gets the security coverage requirement, if any.
Return value
array Requirements array as specified by hook_requirements(), or an empty array if no requirements can be determined.
File
-
core/
modules/ update/ src/ ProjectSecurityRequirement.php, line 115
Class
- ProjectSecurityRequirement
- Class for generating a project's security requirement.
Namespace
Drupal\updateCode
public function getRequirement() {
if (isset($this->securityCoverageInfo['security_coverage_end_version'])) {
$requirement = $this->getVersionEndRequirement();
}
elseif (isset($this->securityCoverageInfo['security_coverage_end_date'])) {
$requirement = $this->getDateEndRequirement();
}
else {
return [];
}
$requirement['title'] = $this->t('Drupal core security coverage');
return $requirement;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.