public function WysiwygEditor::getMetadata in Drupal 10
Same name and namespace in other branches
- 8 core/modules/quickedit/tests/modules/src/Plugin/InPlaceEditor/WysiwygEditor.php \Drupal\quickedit_test\Plugin\InPlaceEditor\WysiwygEditor::getMetadata()
- 9 core/modules/quickedit/tests/modules/src/Plugin/InPlaceEditor/WysiwygEditor.php \Drupal\quickedit_test\Plugin\InPlaceEditor\WysiwygEditor::getMetadata()
Generates metadata that is needed specifically for this editor.
Will only be called by \Drupal\quickedit\MetadataGeneratorInterface::generate() when the passed in field & item values will use this editor.
Parameters
\Drupal\Core\Field\FieldItemListInterface $items: The field values to be in-place edited.
Return value
array A keyed array with metadata. Each key should be prefixed with the plugin ID of the editor.
Overrides InPlaceEditorBase::getMetadata
File
- core/
modules/ quickedit/ tests/ modules/ src/ Plugin/ InPlaceEditor/ WysiwygEditor.php, line 36
Class
- WysiwygEditor
- Defines the 'wysiwyg' in-place editor.
Namespace
Drupal\quickedit_test\Plugin\InPlaceEditorCode
public function getMetadata(FieldItemListInterface $items) {
$metadata['format'] = $items[0]->format;
return $metadata;
}