You are here

public function GutenbergLibraryManager::clearCachedDefinitions in Gutenberg 8.2

Clears static and persistent plugin definition caches.

Don't resort to calling \Drupal::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager!

Overrides DefaultPluginManager::clearCachedDefinitions

File

src/GutenbergLibraryManager.php, line 172

Class

GutenbergLibraryManager
Provides the default .gutenberg.yml library plugin manager.

Namespace

Drupal\gutenberg

Code

public function clearCachedDefinitions() {
  parent::clearCachedDefinitions();
  $this->definitionsByExtension = NULL;
  $this->activeThemeDefinitions = NULL;
  $this->activeThemeMergedDefinition = NULL;
}