public function DisplayPluginBase::destroy

Clears a plugin.

Overrides PluginBase::destroy

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 169
Contains Drupal\views\Plugin\views\display\DisplayPluginBase.

Class

DisplayPluginBase
The default display plugin handler. Display plugins handle options and basic mechanisms for different output methods.

Namespace

Drupal\views\Plugin\views\display

Code

public function destroy() {
  parent::destroy();
  foreach ($this->handlers as $type => $handlers) {
    foreach ($handlers as $id => $handler) {
      if (is_object($handler)) {
        $this->handlers[$type][$id]
          ->destroy();
      }
    }
  }
  if (isset($this->default_display)) {
    unset($this->default_display);
  }
  foreach ($this->extender as $extender) {
    $extender
      ->destroy();
  }
}