You are here

public function ProjectCoreCompatibility::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/update/src/ProjectCoreCompatibility.php \Drupal\update\ProjectCoreCompatibility::__construct()

Constructs a ProjectCoreCompatibility object.

Parameters

array $core_data: The project data for Drupal core as returned by \Drupal\update\UpdateManagerInterface::getProjects() and then processed by update_process_project_info() and update_calculate_project_update_status().

array $core_releases: The Drupal core available releases.

See also

\Drupal\update\UpdateManagerInterface::getProjects()

update_process_project_info()

update_calculate_project_update_status()

File

core/modules/update/src/ProjectCoreCompatibility.php, line 62

Class

ProjectCoreCompatibility
Utility class to set core compatibility messages for project releases.

Namespace

Drupal\update

Code

public function __construct(array $core_data, array $core_releases) {
  if (isset($core_data['existing_version'])) {
    $this->existingCoreVersion = $core_data['existing_version'];
    $this->possibleCoreUpdateVersions = $this
      ->getPossibleCoreUpdateVersions($core_releases);
  }
}