CachedDiscoveryClearer.php
Same filename and directory in other branches
- 11.x core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
- 10 core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
- 10 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
- 9 core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
- 9 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
- 8.9.x core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
- 8.9.x core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
Namespace
Drupal\Core\PluginFile
-
core/
lib/ Drupal/ Core/ Plugin/ CachedDiscoveryClearer.php
View source
<?php
namespace Drupal\Core\Plugin;
use Symfony\Component\DependencyInjection\Attribute\AutowireIterator;
/**
* Defines a class which is capable of clearing the cache on plugin managers.
*/
class CachedDiscoveryClearer implements CachedDiscoveryClearerInterface {
/**
* Constructs the CachedDiscoveryClearer service.
*
* @param \Traversable $cachedDiscoveries
* The cached discoveries.
*/
public function __construct(#[AutowireIterator(tag: 'plugin_manager_cache_clear')] protected \Traversable $cachedDiscoveries) {
}
/**
* {@inheritdoc}
*/
public function clearCachedDefinitions() {
foreach ($this->cachedDiscoveries as $cached_discovery) {
$cached_discovery->clearCachedDefinitions();
}
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| CachedDiscoveryClearer | Defines a class which is capable of clearing the cache on plugin managers. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.