Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UpdateHookRegistry.php

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal