You are here

public function DisplayPluginCollection::remove in Drupal 9

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

Removes an initialized plugin.

The plugin can still be used; it will be reinitialized.

Parameters

string $instance_id: The ID of the plugin instance to remove.

Overrides LazyPluginCollection::remove

File

core/modules/views/src/DisplayPluginCollection.php, line 102

Class

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

Namespace

Drupal\views

Code

public function remove($instance_id) {
  $this
    ->get($instance_id)
    ->remove();
  parent::remove($instance_id);
}