protected function Editor::textFormatHasTransformationFilters in Drupal 8
Same name and namespace in other branches
- 9 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 61
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()));
}