function FilterFormat::removeFilter

Removes a filter.

Parameters

string $instance_id: The ID of a filter plugin to be removed.

Overrides FilterFormatInterface::removeFilter

1 call to FilterFormat::removeFilter()
FilterFormat::onDependencyRemoval in core/modules/filter/src/Entity/FilterFormat.php
Informs the entity that entities it depends on will be deleted.

File

core/modules/filter/src/Entity/FilterFormat.php, line 407

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

public function removeFilter($instance_id) {
  unset($this->filters[$instance_id]);
  $this->filterCollection
    ->removeInstanceId($instance_id);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.