function PackageManagerUpdateProcessor::getProjectData
Gets the project data by name.
Parameters
string $name: The project name.
Return value
mixed[] The project data if any is available, otherwise NULL.
File
-
core/
modules/ package_manager/ src/ PackageManagerUpdateProcessor.php, line 61
Class
- PackageManagerUpdateProcessor
- Extends the Update module's update processor allow fetching any project.
Namespace
Drupal\package_managerCode
public function getProjectData(string $name) : ?array {
if ($this->availableReleasesTempStore
->has($name)) {
return $this->availableReleasesTempStore
->get($name);
}
$project_fetch_data = [
'name' => $name,
'project_type' => 'unknown',
'includes' => [],
];
$this->createFetchTask($project_fetch_data);
if ($this->processFetchTask($project_fetch_data)) {
// If the fetch task was successful return the project information.
return $this->availableReleasesTempStore
->get($name);
}
return NULL;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.