function StatusInfoDrush::getStatus

8.0.x StatusInfoDrush.php StatusInfoDrush::getStatus($projects, $check_disabled)
7.x StatusInfoDrush.php StatusInfoDrush::getStatus($projects, $check_disabled)
master StatusInfoDrush.php StatusInfoDrush::getStatus($projects, $check_disabled)

Get update information for all installed projects.

Return value

Array of update status information.

Overrides StatusInfoInterface::getStatus

File

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

Namespace

Drush\UpdateService

Class

StatusInfoDrush

Code

function getStatus($projects, $check_disabled) {
  // Exclude disabled projects.
  if (!$check_disabled) {
    foreach ($projects as $project_name => $project) {
      if (!$project['status']) {
        unset($projects[$project_name]);
      }
    }
  }
  $available = $this->getAvailableReleases($projects);
  $update_info = $this->calculateUpdateStatus($available, $projects);
  return $update_info;
}