function ComponentPluginManager::clearCachedDefinitions

Same name in this branch
  1. 11.x core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::clearCachedDefinitions()
Same name and namespace in other branches
  1. 10 core/modules/sdc/src/ComponentPluginManager.php \Drupal\sdc\ComponentPluginManager::clearCachedDefinitions()
  2. 10 core/lib/Drupal/Core/Theme/ComponentPluginManager.php \Drupal\Core\Theme\ComponentPluginManager::clearCachedDefinitions()

Overrides DefaultPluginManager::clearCachedDefinitions

File

core/lib/Drupal/Core/Theme/ComponentPluginManager.php, line 164

Class

ComponentPluginManager
Defines a plugin manager to deal with components.

Namespace

Drupal\Core\Theme

Code

public function clearCachedDefinitions() : void {
  parent::clearCachedDefinitions();
  $this->componentNegotiator
    ->clearCache();
  // When clearing cached definitions from theme install or uninstall, the
  // container is not rebuilt. Unset discovery so it will be re-instantiated
  // in getDiscovery() with the updated list of theme directories.
  $this->discovery = NULL;
}

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