You are here

public function LazyPluginCollection::clear in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Plugin/LazyPluginCollection.php \Drupal\Component\Plugin\LazyPluginCollection::clear()
  2. 9 core/lib/Drupal/Component/Plugin/LazyPluginCollection.php \Drupal\Component\Plugin\LazyPluginCollection::clear()

Clears all instantiated plugins.

File

core/lib/Drupal/Component/Plugin/LazyPluginCollection.php, line 55

Class

LazyPluginCollection
Defines an object which stores multiple plugin instances to lazy load them.

Namespace

Drupal\Component\Plugin

Code

public function clear() {
  $this->pluginInstances = [];
}