Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProjectSecurityData.php

function 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\update

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal