function StatusInfoDrupal8::beforeGetStatus

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

Perform adjustments before running get status.

  • Enforce check-disabled option on update module.
1 call to StatusInfoDrupal8::beforeGetStatus()
StatusInfoDrupal8::getStatus in lib/Drush/UpdateService/StatusInfoDrupal8.php
Get update information for all installed projects.
1 method overrides StatusInfoDrupal8::beforeGetStatus()
StatusInfoDrupal7::beforeGetStatus in lib/Drush/UpdateService/StatusInfoDrupal7.php
Perform adjustments before running get status.

File

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

Namespace

Drush\UpdateService

Class

StatusInfoDrupal8

Code

function beforeGetStatus(&$projects, $check_disabled) {
  // If check-disabled option was provided, alter Drupal settings temporarily.
  // There's no other way to hook into this.
  if (!is_null($check_disabled)) {
    $config = \Drupal::config('update.settings');
    $this->update_check_disabled = $config->get('check.disabled_extensions');
    $config->set('check.disabled_extensions', (bool) $check_disabled);
  }
}