You are here

public function DisplayPluginBase::destroy in Views (for Drupal 7) 8.3

Clears a plugin.

Overrides PluginBase::destroy

File

lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php, line 161
Definition of 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();
  }
}