function ProjectInfo::getProjectInfo

Returns up-to-date project information.

Return value

mixed[]|null The retrieved project information.

Throws

\RuntimeException If data about available updates cannot be retrieved.

3 calls to ProjectInfo::getProjectInfo()
ProjectInfo::getInstallableReleases in core/modules/package_manager/src/ProjectInfo.php
Gets all project releases to which the site can update.
ProjectInfo::getInstalledVersion in core/modules/package_manager/src/ProjectInfo.php
Returns the installed project version via the Update Status module.
ProjectInfo::isInstalledVersionSafe in core/modules/package_manager/src/ProjectInfo.php
Checks if the installed version of this project is safe to use.

File

core/modules/package_manager/src/ProjectInfo.php, line 66

Class

ProjectInfo
Retrieves project information from the Update Status module.

Namespace

Drupal\package_manager

Code

public function getProjectInfo() : ?array {
  $available_updates = $this->getAvailableProjects();
  $project_data = update_calculate_project_data($available_updates);
  if (!isset($project_data[$this->name])) {
    return $available_updates[$this->name] ?? NULL;
  }
  return $project_data[$this->name];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.