public function CKEditor::getMetadata in Editor 7
Implements QuickEditInPlaceEditorInterface::getMetadata().
Overrides QuickEditInPlaceEditorInterface::getMetadata
See also
Drupal 8's \Drupal\editor\Plugin\quickedit\editor\Editor::getMetadata().
File
- InPlaceEditors/
CKEditor.php, line 52
Class
- CKEditor
- Defines the CKEditor in-place editor.
Code
public function getMetadata(array $instance, array $items) {
$format_id = $items[0]['format'];
$metadata['format'] = $format_id;
$metadata['formatHasTransformations'] = (bool) count(array_intersect(array(
FILTER_TYPE_TRANSFORM_REVERSIBLE,
FILTER_TYPE_TRANSFORM_IRREVERSIBLE,
), filter_get_filter_types_by_format($format_id)));
return $metadata;
}