public function UpdateManager::getDefinitions in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getDefinitions()
- 8 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getDefinitions()
- 8.2 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getDefinitions()
- 8.3 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getDefinitions()
Returns all update definitions, optionally filtered by provider module.
Parameters
string $module: (optional) The machine name of the module by which to filter updates.
Return value
array[] The discovered update definitions.
2 calls to UpdateManager::getDefinitions()
- UpdateManager::getAvailable in src/
UpdateManager.php - Returns all available update definitions.
- UpdateManager::getVersion in src/
UpdateManager.php - Tries to determine the semantic version of a module.
File
- src/
UpdateManager.php, line 148
Class
- UpdateManager
- Discovers and manages optional configuration updates.
Namespace
Drupal\lightning_coreCode
public function getDefinitions($module = NULL) {
$definitions = $this->discovery
->getDefinitions();
ksort($definitions);
if ($module) {
$filter = function (array $definition) use ($module) {
return $definition['provider'] === $module;
};
$definitions = array_filter($definitions, $filter);
}
return $definitions;
}