class CachedDiscoveryClearer in Zircon Profile 8.0
Same name in this branch
- 8.0 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php \Drupal\Core\Plugin\CachedDiscoveryClearer
- 8.0 core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php \Drupal\Core\ProxyClass\Plugin\CachedDiscoveryClearer
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php \Drupal\Core\Plugin\CachedDiscoveryClearer
Defines a class which is capable of clearing the cache on plugin managers.
Hierarchy
- class \Drupal\Core\Plugin\CachedDiscoveryClearer implements CachedDiscoveryClearerInterface
Expanded class hierarchy of CachedDiscoveryClearer
1 string reference to 'CachedDiscoveryClearer'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses CachedDiscoveryClearer
File
- core/
lib/ Drupal/ Core/ Plugin/ CachedDiscoveryClearer.php, line 15 - Contains \Drupal\Core\Plugin\CachedDiscoveryClearer.
Namespace
Drupal\Core\PluginView source
class CachedDiscoveryClearer implements CachedDiscoveryClearerInterface {
/**
* The stored discoveries.
*
* @var \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface[]
*/
protected $cachedDiscoveries = array();
/**
* {@inheritdoc}
*/
public function addCachedDiscovery(CachedDiscoveryInterface $cached_discovery) {
$this->cachedDiscoveries[] = $cached_discovery;
}
/**
* {@inheritdoc}
*/
public function clearCachedDefinitions() {
foreach ($this->cachedDiscoveries as $cached_discovery) {
$cached_discovery
->clearCachedDefinitions();
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CachedDiscoveryClearer:: |
protected | property | The stored discoveries. | |
CachedDiscoveryClearer:: |
public | function |
Adds a plugin manager to the active list. Overrides CachedDiscoveryClearerInterface:: |
|
CachedDiscoveryClearer:: |
public | function |
Clears the cache on all cached discoveries. Overrides CachedDiscoveryClearerInterface:: |