Same filename in this branch
- 10 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
- 10 core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
- 9 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
Namespace
Drupal\Core\Plugin
File
core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
View source
<?php
namespace Drupal\Core\Plugin;
use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface;
class CachedDiscoveryClearer implements CachedDiscoveryClearerInterface {
protected $cachedDiscoveries = [];
public function addCachedDiscovery(CachedDiscoveryInterface $cached_discovery) {
$this->cachedDiscoveries[] = $cached_discovery;
}
public function clearCachedDefinitions() {
foreach ($this->cachedDiscoveries as $cached_discovery) {
$cached_discovery
->clearCachedDefinitions();
}
}
}
Classes