function UpdateRegistry::registerInvokedUpdates

Same name in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::registerInvokedUpdates()
  2. 8.9.x core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::registerInvokedUpdates()
  3. 11.x core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::registerInvokedUpdates()

Registers that update functions were executed.

Parameters

string[] $function_names: The executed update functions.

Return value

$this

1 call to UpdateRegistry::registerInvokedUpdates()
UpdateRegistry::onConfigSave in core/lib/Drupal/Core/Update/UpdateRegistry.php
Processes the list of installed extensions when core.extension changes.

File

core/lib/Drupal/Core/Update/UpdateRegistry.php, line 255

Class

UpdateRegistry
Provides all and missing update implementations.

Namespace

Drupal\Core\Update

Code

public function registerInvokedUpdates(array $function_names) {
    $executed_updates = $this->keyValue
        ->get('existing_updates', []);
    $executed_updates = array_merge($executed_updates, $function_names);
    $this->keyValue
        ->set('existing_updates', $executed_updates);
    return $this;
}

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