You are here

public function DisplayPluginCollection::clear in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/DisplayPluginCollection.php \Drupal\views\DisplayPluginCollection::clear()

Clears all instantiated plugins.

Overrides LazyPluginCollection::clear

1 call to DisplayPluginCollection::clear()
DisplayPluginCollection::__destruct in core/modules/views/src/DisplayPluginCollection.php
Destructs a DisplayPluginCollection object.

File

core/modules/views/src/DisplayPluginCollection.php, line 65
Contains \Drupal\views\DisplayPluginCollection.

Class

DisplayPluginCollection
A class which wraps the displays of a view so you can lazy-initialize them.

Namespace

Drupal\views

Code

public function clear() {
  foreach (array_filter($this->pluginInstances) as $display) {
    $display
      ->destroy();
  }
  parent::clear();
}