public static function ProjectSecurityData::createFromProjectDataAndReleases in Drupal 8
Same name and namespace in other branches
- 9 core/modules/update/src/ProjectSecurityData.php \Drupal\update\ProjectSecurityData::createFromProjectDataAndReleases()
Creates a ProjectSecurityData object from project data and releases.
Parameters
array $project_data: Project data from Drupal\update\UpdateManagerInterface::getProjects() and processed by update_process_project_info().
array $releases: Project releases as returned by update_get_available().
Return value
static
File
- core/
modules/ update/ src/ ProjectSecurityData.php, line 94
Class
- ProjectSecurityData
- Calculates a project's security coverage information.
Namespace
Drupal\updateCode
public static function createFromProjectDataAndReleases(array $project_data, array $releases) {
if (!($project_data['project_type'] === 'core' && $project_data['name'] === 'drupal')) {
// Only Drupal core has an explicit coverage range.
return new static();
}
return new static($project_data['existing_version'], $releases);
}