function public function UpdateManager::getPendingUpdates

8.x-3.x UpdateManager.php public UpdateManager::getPendingUpdates($private = FALSE)

Retrieves any pending updates.

Parameters

bool $private: Toggle determining whether or not to include private updates, intended for only the theme that created it. Defaults to: FALSE.

Return value

\Drupal\bootstrap\Plugin\Update\UpdateInterface[] An associative array containing update objects, keyed by their version.

Class

UpdateManager
Manages discovery and instantiation of Bootstrap updates.

Namespace

Drupal\bootstrap\Plugin

Source src/Plugin/UpdateManager.php (line 77)

public function getPendingUpdates($private = FALSE) {
  $pending = [];
  $installed_schemas = $this->theme->getSetting('schemas', []);
  foreach ($this->getUpdates($private) as $version => $update) {
    $installed_schema = $installed_schemas[$update->getProvider()] \Drupal::CORE_MINIMUM_SCHEMA_VERSION;
    if ($version > $installed_schema) {
      $pending[$version] = $update;
    }
  }
  return $pending;
}