You are here

public function TagPluginManager::clearCachedDefinitions in Extensible BBCode 4.0.x

Same name and namespace in other branches
  1. 8.3 src/TagPluginManager.php \Drupal\xbbcode\TagPluginManager::clearCachedDefinitions()

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/TagPluginManager.php, line 93

Class

TagPluginManager
Manages BBCode tags.

Namespace

Drupal\xbbcode

Code

public function clearCachedDefinitions() : void {
  parent::clearCachedDefinitions();
  $this->ids = NULL;
  $this->defaultConfiguration = NULL;
  $this->defaultNameCollisions = NULL;

  // Refresh the default plugin collection, if it is active.
  if ($this->defaultCollection) {
    $this->defaultCollection
      ->setConfiguration($this
      ->getDefaultConfiguration());
  }
}