function UpdateHookRegistry::setInstalledVersion

Same name in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateHookRegistry.php \Drupal\Core\Update\UpdateHookRegistry::setInstalledVersion()
  2. 10 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 160

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);
    $this->deleteEquivalentUpdate($module, $version);
    return $this;
}

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