function drupal_get_updaters

Same name in other branches
  1. 7.x includes/common.inc \drupal_get_updaters()
  2. 9 core/includes/common.inc \drupal_get_updaters()
  3. 10 core/includes/common.inc \drupal_get_updaters()
  4. 11.x core/includes/common.inc \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()

6 calls to drupal_get_updaters()
UpdateManagerInstall::submitForm in core/modules/update/src/Form/UpdateManagerInstall.php
Form submission handler.
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.
UpdateTestBase::setUp in core/modules/update/src/Tests/UpdateTestBase.php
Sets up a Drupal site for running functional and integration tests.
UpdateTestBase::setUp in core/modules/update/tests/src/Functional/UpdateTestBase.php

... See full list

File

core/includes/common.inc, line 1227

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;
}

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