function StatusInfoDrupal8::afterGetStatus

8.0.x StatusInfoDrupal8.php StatusInfoDrupal8::afterGetStatus(&$update_info, $projects, $check_disabled)
7.x StatusInfoDrupal8.php StatusInfoDrupal8::afterGetStatus(&$update_info, $projects, $check_disabled)
master StatusInfoDrupal8.php StatusInfoDrupal8::afterGetStatus(&$update_info, $projects, $check_disabled)

Perform adjustments after running get status.

  • Restore check-disabled setting in update module.
  • Adjust project type for disabled projects.
1 call to StatusInfoDrupal8::afterGetStatus()
StatusInfoDrupal8::getStatus in lib/Drush/UpdateService/StatusInfoDrupal8.php
Get update information for all installed projects.
1 method overrides StatusInfoDrupal8::afterGetStatus()
StatusInfoDrupal7::afterGetStatus in lib/Drush/UpdateService/StatusInfoDrupal7.php
Perform adjustments after running get status.

File

lib/Drush/UpdateService/StatusInfoDrupal8.php, line 71
Implementation of 'drupal' update_status engine for Drupal 8.

Namespace

Drush\UpdateService

Class

StatusInfoDrupal8

Code

function afterGetStatus(&$update_info, $projects, $check_disabled) {
  // Restore Drupal settings.
  if (!is_null($check_disabled)) {
    \Drupal::config('update.settings')->set('check.disabled_extensions', $this->update_check_disabled);
    unset($this->update_check_disabled);
  }

  // update.module sets a different project type
  // for disabled projects. Here we normalize it.
  if ($check_disabled) {
    foreach ($update_info as $key => $project) {
      if (in_array($project['project_type'], array('module-disabled', 'theme-disabled'))) {
        $update_info[$key]['project_type'] = substr($project['project_type'], 0, strpos($project['project_type'], '-'));
      }
    }
  }
}