You are here

public function UpdateRegistry::registerInvokedUpdates in Drupal 9

Same name and namespace in other branches
  1. 8 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

File

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

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