function DbUpdateController::getModuleUpdates

Same name in other branches
  1. 8.9.x core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::getModuleUpdates()
  2. 10 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::getModuleUpdates()
  3. 11.x core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::getModuleUpdates()

Retrieves module updates.

Return value

array The module updates that can be performed.

1 call to DbUpdateController::getModuleUpdates()
DbUpdateController::triggerBatch in core/modules/system/src/Controller/DbUpdateController.php
Starts the database update batch process.

File

core/modules/system/src/Controller/DbUpdateController.php, line 707

Class

DbUpdateController
Controller routines for database update routes.

Namespace

Drupal\system\Controller

Code

protected function getModuleUpdates() {
    $return = [];
    $updates = update_get_update_list();
    foreach ($updates as $module => $update) {
        $return[$module] = $update['start'];
    }
    return $return;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.