public function UpdateManager::getDefinitions in Lightning Core 8.2
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.3 src/UpdateManager.php \Drupal\lightning_core\UpdateManager::getDefinitions()
- 8.4 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 134
Class
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;
}