public function ExtensionList::reset in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Extension/ExtensionList.php \Drupal\Core\Extension\ExtensionList::reset()
 
Resets the stored extension list.
We don't reset statically added filenames, as it is a static cache which logically can't change. This is done for performance reasons of the installer.
Return value
$this
1 call to ExtensionList::reset()
- ThemeExtensionList::reset in core/
lib/ Drupal/ Core/ Extension/ ThemeExtensionList.php  - Resets the stored extension list.
 
1 method overrides ExtensionList::reset()
- ThemeExtensionList::reset in core/
lib/ Drupal/ Core/ Extension/ ThemeExtensionList.php  - Resets the stored extension list.
 
File
- core/
lib/ Drupal/ Core/ Extension/ ExtensionList.php, line 163  
Class
- ExtensionList
 - Provides available extensions.
 
Namespace
Drupal\Core\ExtensionCode
public function reset() {
  $this->extensions = NULL;
  $this->cache
    ->delete($this
    ->getListCacheId());
  $this->extensionInfo = NULL;
  $this->cache
    ->delete($this
    ->getInfoCacheId());
  $this->pathNames = NULL;
  try {
    $this->state
      ->delete($this
      ->getPathnamesCacheId());
  } catch (DatabaseExceptionWrapper $e) {
    // Ignore exceptions caused by a non existing {key_value} table in the
    // early installer.
  }
  $this->cache
    ->delete($this
    ->getPathnamesCacheId());
  // @todo In the long run it would be great to add the reset, but the early
  //   installer fails due to that. https://www.drupal.org/node/2719315 could
  //   help to resolve with that.
  return $this;
}