function UpdateDataSubscriber::clearData

Same name and namespace in other branches
  1. 11.x core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php \Drupal\package_manager\EventSubscriber\UpdateDataSubscriber::clearData()

Clears stale update data.

This will always run after any stage directory changes are applied to the active directory, since it's likely that core and/or multiple extensions have been added, removed, or updated.

File

core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php, line 31

Class

UpdateDataSubscriber
Clears stale update data once staged changes have been applied.

Namespace

Drupal\package_manager\EventSubscriber

Code

public function clearData() : void {
  $this->updateManager
    ->refreshUpdateData();
  update_storage_clear();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.