private function StatusInfoDrush::getAvailableReleases

8.0.x StatusInfoDrush.php private StatusInfoDrush::getAvailableReleases($projects)
7.x StatusInfoDrush.php private StatusInfoDrush::getAvailableReleases($projects)
master StatusInfoDrush.php private StatusInfoDrush::getAvailableReleases($projects)

Obtains release info for projects.

1 call to StatusInfoDrush::getAvailableReleases()
StatusInfoDrush::getStatus in lib/Drush/UpdateService/StatusInfoDrush.php
Get update information for all installed projects.

File

lib/Drush/UpdateService/StatusInfoDrush.php, line 81
Implementation of 'drush' update_status engine for any Drupal version.

Namespace

Drush\UpdateService

Class

StatusInfoDrush

Code

private function getAvailableReleases($projects) {
  drush_log(dt('Checking available update data ...'), LogLevel::OK);

  $release_info = drush_include_engine('release_info', 'updatexml');

  $available = array();
  foreach ($projects as $project_name => $project) {
    // Discard projects with unknown installation path.
    if ($project_name != 'drupal' && !isset($project['path'])) {
      continue;
    }
    drush_log(dt('Checking available update data for !project.', array('!project' => $project['label'])), LogLevel::OK);
    $request = pm_parse_request($project_name, NULL, $project_name);
    $project_release_info = $release_info->get($request);
    if ($project_release_info) {
      $available[$project_name] = $project_release_info;
    }
  }

  // Clear any error set by a failed project. This avoid rollbacks.
  drush_clear_error();

  return $available;
}