public function PluginDiscoveryDecorator::clearCachedDefinitions in Plugin 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 CachedDiscoveryInterface::clearCachedDefinitions
2 calls to PluginDiscoveryDecorator::clearCachedDefinitions()
- LimitedPluginDiscoveryDecorator::resetDiscoveryLimit in src/
PluginDiscovery/ LimitedPluginDiscoveryDecorator.php - Resets the discovery limit.
- PluginDiscoveryDecorator::useCaches in src/
PluginDiscovery/ PluginDiscoveryDecorator.php - Disable the use of caches.
File
- src/
PluginDiscovery/ PluginDiscoveryDecorator.php, line 94
Class
- PluginDiscoveryDecorator
- Decorates plugin discovery.
Namespace
Drupal\plugin\PluginDiscoveryCode
public function clearCachedDefinitions() {
$this->pluginDefinitions = NULL;
$decorated_discovery = $this->decoratedDiscovery;
if ($decorated_discovery instanceof CachedDiscoveryInterface) {
$decorated_discovery
->clearCachedDefinitions();
}
}