function Editor::textFormatHasTransformationFilters
Same name in this branch
- 9 core/modules/quickedit/src/Plugin/InPlaceEditor/Editor.php \Drupal\quickedit\Plugin\InPlaceEditor\Editor::textFormatHasTransformationFilters()
Same name in other branches
- 8.9.x core/modules/editor/src/Plugin/InPlaceEditor/Editor.php \Drupal\editor\Plugin\InPlaceEditor\Editor::textFormatHasTransformationFilters()
Returns whether the text format has transformation filters.
Parameters
int $format_id: A text format ID.
Return value
bool
1 call to Editor::textFormatHasTransformationFilters()
- Editor::getMetadata in core/
modules/ editor/ src/ Plugin/ InPlaceEditor/ Editor.php - Generates metadata that is needed specifically for this editor.
File
-
core/
modules/ editor/ src/ Plugin/ InPlaceEditor/ Editor.php, line 74
Class
- Editor
- Defines the formatted text in-place editor.
Namespace
Drupal\editor\Plugin\InPlaceEditorCode
protected function textFormatHasTransformationFilters($format_id) {
$format = FilterFormat::load($format_id);
return (bool) count(array_intersect([
FilterInterface::TYPE_TRANSFORM_REVERSIBLE,
FilterInterface::TYPE_TRANSFORM_IRREVERSIBLE,
], $format->getFiltertypes()));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.