public function UpdateRegistry::filterOutInvokedUpdatesByExtension in Drupal 10
Filters out already executed update functions by extension.
Parameters
string $extension: The extension name.
File
- core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php, line 287
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 strpos($function_name, "{$extension}_{$this->updateType}_") !== 0;
});
$this->keyValue
->set('existing_updates', array_values($remaining_update_functions));
}