function UpdateHookRegistry::deleteEquivalentUpdate
Same name in other branches
- 11.x core/lib/Drupal/Core/Update/UpdateHookRegistry.php \Drupal\Core\Update\UpdateHookRegistry::deleteEquivalentUpdate()
Removes an equivalent update.
Parameters
string $module: The module providing the update.
int $version: The equivalent update to remove.
Return value
bool TRUE if an equivalent update was removed, or FALSE if it was not.
1 call to UpdateHookRegistry::deleteEquivalentUpdate()
- UpdateHookRegistry::setInstalledVersion in core/
lib/ Drupal/ Core/ Update/ UpdateHookRegistry.php - Updates the installed version information for a module.
File
-
core/
lib/ Drupal/ Core/ Update/ UpdateHookRegistry.php, line 295
Class
- UpdateHookRegistry
- Provides module updates versions handling.
Namespace
Drupal\Core\UpdateCode
protected function deleteEquivalentUpdate(string $module, int $version) : bool {
$data = $this->equivalentUpdates
->get($module, []);
if (isset($data[$version])) {
unset($data[$version]);
if (empty($data)) {
$this->equivalentUpdates
->delete($module);
}
else {
$this->equivalentUpdates
->set($module, $data);
}
return TRUE;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.