function FilterFormat::filters

Same name in other branches
  1. 9 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()
  2. 10 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()
  3. 11.x core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()

Overrides FilterFormatInterface::filters

3 calls to FilterFormat::filters()
FilterFormat::getFilterTypes in core/modules/filter/src/Entity/FilterFormat.php
Retrieves all filter types that are used in the text format.
FilterFormat::getPluginCollections in core/modules/filter/src/Entity/FilterFormat.php
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 141

Class

FilterFormat
Represents a text format.

Namespace

Drupal\filter\Entity

Code

public function filters($instance_id = NULL) {
    if (!isset($this->filterCollection)) {
        $this->filterCollection = new FilterPluginCollection(\Drupal::service('plugin.manager.filter'), $this->filters);
        $this->filterCollection
            ->sort();
    }
    if (isset($instance_id)) {
        return $this->filterCollection
            ->get($instance_id);
    }
    return $this->filterCollection;
}

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