function drupal_load_updates
Loads .install files for installed modules to initialize the update system.
3 calls to drupal_load_updates()
- DbUpdateController::handle in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Returns a database update page.
- PendingUpdatesValidator::updatesExist in core/
modules/ package_manager/ src/ Validator/ PendingUpdatesValidator.php - Checks if there are any pending update or post-update hooks.
- SystemManager::listRequirements in core/
modules/ system/ src/ SystemManager.php - Displays the site status report. Can also be used as a pure check.
File
-
core/
includes/ install.inc, line 79
Code
function drupal_load_updates() {
/** @var \Drupal\Core\Extension\ModuleExtensionList $extension_list_module */
$extension_list_module = \Drupal::service('extension.list.module');
foreach (\Drupal::service('update.update_hook_registry')->getAllInstalledVersions() as $module => $schema_version) {
if ($extension_list_module->exists($module) && !$extension_list_module->checkIncompatibility($module)) {
if ($schema_version > -1) {
\Drupal::moduleHandler()->loadInclude($module, 'install');
}
}
}
}