public function UpdateManager::getAvailable in Lightning Core 8
Same name and namespace in other branches
- 8.5 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getAvailable()
- 8.2 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getAvailable()
- 8.3 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getAvailable()
- 8.4 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getAvailable()
Returns all available update definitions.
Return value
array[] The available update definitions.
1 call to UpdateManager::getAvailable()
- UpdateManager::executeAllInConsole in src/
UpdateManager.php - Executes all available updates in a console context.
File
- src/
UpdateManager.php, line 153
Class
Namespace
Drupal\lightning_coreCode
public function getAvailable() {
$versions = $this->configFactory
->getEditable(static::CONFIG_NAME);
$filter = function (array $definition) use ($versions) {
$provider_version = $versions
->get($definition['provider']) ?: static::VERSION_UNKNOWN;
return version_compare($definition['id'], $provider_version, '>');
};
return array_filter($this
->getDefinitions(), $filter);
}