Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. common.inc

function drupal_get_updaters

Assembles the Drupal Updater registry.

An Updater is a class that knows how to update various parts of the Drupal file system, for example to update modules that have newer releases, or to install a new theme.

Return value

array The Drupal Updater class registry.

See also

\Drupal\Core\Updater\Updater

hook_updater_info()

hook_updater_info_alter()

2 calls to drupal_get_updaters()
Updater::getUpdaterFromDirectory in core/lib/Drupal/Core/Updater/Updater.php
Determines which Updater class can operate on the given directory.
UpdateReady::submitForm in core/modules/update/src/Form/UpdateReady.php
Form submission handler.

File

core/includes/common.inc, line 479

Code

function drupal_get_updaters() {
    $updaters =& drupal_static(__FUNCTION__);
    if (!isset($updaters)) {
        $updaters = \Drupal::moduleHandler()->invokeAll('updater_info');
        \Drupal::moduleHandler()->alter('updater_info', $updaters);
        uasort($updaters, [
            SortArray::class,
            'sortByWeightElement',
        ]);
    }
    return $updaters;
}
RSS feed
Powered by Drupal