You are here

public function UpdateHookRegistry::setInstalledVersion in Drupal 10

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateHookRegistry.php \Drupal\Core\Update\UpdateHookRegistry::setInstalledVersion()

Updates the installed version information for a module.

Parameters

string $module: A module name.

int $version: The new schema version.

Return value

self Returns self to support chained method calls.

File

core/lib/Drupal/Core/Update/UpdateHookRegistry.php, line 137

Class

UpdateHookRegistry
Provides module updates versions handling.

Namespace

Drupal\Core\Update

Code

public function setInstalledVersion(string $module, int $version) : self {
  $this->keyValue
    ->set($module, $version);
  return $this;
}