function FilterFormat::filters

Same name in other branches
  1. 9 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()
  2. 8.9.x core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()
  3. 10 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
FilterFormat::getPluginCollections in core/modules/filter/src/Entity/FilterFormat.php
FilterFormat::onDependencyRemoval in core/modules/filter/src/Entity/FilterFormat.php

File

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

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.