public function EditPluginInterface::getMetadata

Generates metadata that is needed specifically for this editor.

Will only be called by \Drupal\edit\MetadataGeneratorInterface::generate() when the passed in field instance & item values will use this editor.

Parameters

\Drupal\field\Plugin\Core\Entity\FieldInstance $instance: The field instance of the field being edited.

array $items: The field's item values.

Return value

array A keyed array with metadata. Each key should be prefixed with the plugin ID of the editor.

2 methods override EditPluginInterface::getMetadata()
Editor::getMetadata in drupal/core/modules/editor/lib/Drupal/editor/Plugin/InPlaceEditor/Editor.php
Implements \Drupal\edit\Plugin\EditPluginInterface::getMetadata().
EditorBase::getMetadata in drupal/core/modules/edit/lib/Drupal/edit/EditorBase.php
Implements \Drupal\edit\EditPluginInterface::getMetadata().

File

drupal/core/modules/edit/lib/Drupal/edit/EditPluginInterface.php, line 49
Contains \Drupal\edit\EditPluginInterface.

Class

EditPluginInterface
Defines an interface for in-place editors (Create.js PropertyEditor widgets).

Namespace

Drupal\edit

Code

public function getMetadata(FieldInstance $instance, array $items);