You are here

public function WysiwygEditor::getMetadata in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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 47
Contains \Drupal\quickedit_test\Plugin\InPlaceEditor\WysiwygEditor.

Class

WysiwygEditor
Defines the 'wysiwyg' in-place editor.

Namespace

Drupal\quickedit_test\Plugin\InPlaceEditor

Code

public function getMetadata(FieldItemListInterface $items) {
  $metadata['format'] = $items[0]->format;
  return $metadata;
}