function UpdateRegistry::filterOutInvokedUpdatesByModule
Same name in other branches
- 9 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::filterOutInvokedUpdatesByModule()
Filters out already executed update functions by module.
Parameters
string $module: The module name.
File
-
core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php, line 275
Class
- UpdateRegistry
- Provides all and missing update implementations.
Namespace
Drupal\Core\UpdateCode
public function filterOutInvokedUpdatesByModule($module) {
$existing_update_functions = $this->keyValue
->get('existing_updates', []);
$remaining_update_functions = array_filter($existing_update_functions, function ($function_name) use ($module) {
return strpos($function_name, "{$module}_{$this->updateType}_") !== 0;
});
$this->keyValue
->set('existing_updates', array_values($remaining_update_functions));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.