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.

File

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

Class

ProjectInfo
Defines a class for retrieving project information from Update 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.