function UpdateRegistry::filterOutInvokedUpdatesByExtension
Same name in other branches
- 9 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::filterOutInvokedUpdatesByExtension()
- 11.x core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::filterOutInvokedUpdatesByExtension()
Filters out already executed update functions by extension.
Parameters
string $extension: The extension name.
1 call to UpdateRegistry::filterOutInvokedUpdatesByExtension()
- UpdateRegistry::onConfigSave in core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php - Processes the list of installed extensions when core.extension changes.
File
-
core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php, line 318
Class
- UpdateRegistry
- Provides all and missing update implementations.
Namespace
Drupal\Core\UpdateCode
public function filterOutInvokedUpdatesByExtension(string $extension) {
$existing_update_functions = $this->keyValue
->get('existing_updates', []);
$remaining_update_functions = array_filter($existing_update_functions, function ($function_name) use ($extension) {
return !str_starts_with($function_name, "{$extension}_{$this->updateType}_");
});
$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.