public function FilterFormat::filters in Drupal 10
Same name and namespace in other branches
- 8 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()
- 9 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::filters()
Returns the ordered collection of filter plugin instances or an individual plugin instance.
Parameters
string $instance_id: (optional) The ID of a filter plugin instance to return.
Return value
\Drupal\filter\FilterPluginCollection|\Drupal\filter\Plugin\FilterInterface Either the filter collection or a specific filter plugin instance.
Overrides FilterFormatInterface::filters
5 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::getHtmlRestrictions in core/
modules/ filter/ src/ Entity/ FilterFormat.php - Retrieve all HTML restrictions (tags and attributes) for the text format.
- FilterFormat::getPluginCollections in core/
modules/ filter/ src/ Entity/ FilterFormat.php - Gets the plugin collections used by this object.
- FilterFormat::onDependencyRemoval in core/
modules/ filter/ src/ Entity/ FilterFormat.php - Informs the entity that entities it depends on will be deleted.
- FilterFormat::preSave in core/
modules/ filter/ src/ Entity/ FilterFormat.php - Acts on an entity before the presave hook is invoked.
File
- core/
modules/ filter/ src/ Entity/ FilterFormat.php, line 141
Class
- FilterFormat
- Represents a text format.
Namespace
Drupal\filter\EntityCode
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;
}