public function UpdateRegistry::getUpdateFunctions in Drupal 10
Returns all available updates for a given extension.
Parameters
string $extension_name: The extension name.
Return value
callable[] A list of update functions.
File
- core/
lib/ Drupal/ Core/ Update/ UpdateRegistry.php, line 248
Class
- UpdateRegistry
- Provides all and missing update implementations.
Namespace
Drupal\Core\UpdateCode
public function getUpdateFunctions($extension_name) {
$this
->scanExtensionsAndLoadUpdateFiles($extension_name);
$all_functions = $this
->getAvailableUpdateFunctions();
return array_filter($all_functions, function ($function_name) use ($extension_name) {
[
$function_extension_name,
] = explode("_{$this->updateType}_", $function_name);
return $function_extension_name === $extension_name;
});
}