public function UpdateManager::getAvailable in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getAvailable()
- 8 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()
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 167
Class
- UpdateManager
- Discovers and manages optional configuration updates.
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);
}