public function UpdateRegistry::filterOutInvokedUpdatesByModule in Drupal 9
Same name and namespace in other branches
- 8 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));
}