public function ProjectCollector::getResults in Upgrade Status 8.3
Get local scanning results for a project.
Parameters
string $project_machine_name: Machine name for project.
Return value
mixed
- NULL if there was no result
- Associative array of results otherwise
2 calls to ProjectCollector::getResults()
- ProjectCollector::collectProjects in src/
ProjectCollector.php - Collect projects of installed modules grouped by custom and contrib.
- ProjectCollector::getPlan in src/
ProjectCollector.php - Get the Drupal 9 plan for a project, either explicitly fetched or cached.
File
- src/
ProjectCollector.php, line 436
Class
- ProjectCollector
- Collects projects and their associated metadata collated for Upgrade Status.
Namespace
Drupal\upgrade_statusCode
public function getResults(string $project_machine_name) {
// Always use a fresh service. An injected service could get stale results
// because scan result saving happens in different HTTP requests for most
// cases (when analysis was successful).
return \Drupal::service('keyvalue')
->get('upgrade_status_scan_results')
->get($project_machine_name) ?: NULL;
}