
| Current Path : /var/www/html/wirtschaftsclub.web-klick.de/core/lib/Drupal/Core/Plugin/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/wirtschaftsclub.web-klick.de/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php |
<?php
namespace Drupal\Core\Plugin;
use Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface;
/**
* Defines a class which is capable of clearing the cache on plugin managers.
*/
class CachedDiscoveryClearer implements CachedDiscoveryClearerInterface {
/**
* The stored discoveries.
*
* @var \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface[]
*/
protected $cachedDiscoveries = [];
/**
* {@inheritdoc}
*/
public function addCachedDiscovery(CachedDiscoveryInterface $cached_discovery) {
$this->cachedDiscoveries[] = $cached_discovery;
}
/**
* {@inheritdoc}
*/
public function clearCachedDefinitions() {
foreach ($this->cachedDiscoveries as $cached_discovery) {
$cached_discovery->clearCachedDefinitions();
}
}
}