You are here

public function UpdateRegistry::getRemovedPostUpdates in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::getRemovedPostUpdates()
  2. 9 core/lib/Drupal/Core/Update/UpdateRegistry.php \Drupal\Core\Update\UpdateRegistry::getRemovedPostUpdates()

Gets removed hook_post_update_NAME() implementations for an extension.

Return value

string[] A list of post-update functions that have been removed.

File

core/lib/Drupal/Core/Update/UpdateRegistry.php, line 98

Class

UpdateRegistry
Provides all and missing update implementations.

Namespace

Drupal\Core\Update

Code

public function getRemovedPostUpdates($extension) {
  $this
    ->scanExtensionsAndLoadUpdateFiles($extension);
  $function = "{$extension}_removed_post_updates";
  if (function_exists($function)) {
    return $function();
  }
  return [];
}