protected function UpdateRegistry::scanExtensionsAndLoadUpdateFiles in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::scanExtensionsAndLoadUpdateFiles()
Scans all module + profile extensions and load the update files.
3 calls to UpdateRegistry::scanExtensionsAndLoadUpdateFiles()
- UpdateRegistry::getModuleUpdateFunctions in core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php - Returns all available updates for a given module.
- UpdateRegistry::getPendingUpdateFunctions in core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php - Find all update functions that haven't been executed.
- UpdateRegistry::getRemovedPostUpdates in core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php - Gets removed hook_post_update_NAME() implementations for a module.
File
- core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php, line 258
Class
- UpdateRegistry
- Provides all and missing update implementations.
Namespace
Drupal\Core\UpdateCode
protected function scanExtensionsAndLoadUpdateFiles() {
// Scan the module list.
$extension_discovery = new ExtensionDiscovery($this->root, FALSE, [], $this->sitePath);
$module_extensions = $extension_discovery
->scan('module');
$profile_extensions = $extension_discovery
->scan('profile');
$extensions = array_merge($module_extensions, $profile_extensions);
$this
->loadUpdateFiles($extensions);
}