You are here

public function TypedDataManager::clearCachedDefinitions in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/TypedData/TypedDataManager.php \Drupal\Core\TypedData\TypedDataManager::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

1 call to TypedDataManager::clearCachedDefinitions()
TypedConfigManager::clearCachedDefinitions in core/lib/Drupal/Core/Config/TypedConfigManager.php
Clears static and persistent plugin definition caches.
1 method overrides TypedDataManager::clearCachedDefinitions()
TypedConfigManager::clearCachedDefinitions in core/lib/Drupal/Core/Config/TypedConfigManager.php
Clears static and persistent plugin definition caches.

File

core/lib/Drupal/Core/TypedData/TypedDataManager.php, line 280

Class

TypedDataManager
Manages data type plugins.

Namespace

Drupal\Core\TypedData

Code

public function clearCachedDefinitions() {
  parent::clearCachedDefinitions();
  $this->prototypes = [];
}