interface EditorSelectorInterface (View source)

Interface for selecting an in-place editor (an Editor plugin) for a field.

Methods

string|null
getEditor(string $formatter_type, FieldItemListInterface $items)

Returns the in-place editor (an InPlaceEditor plugin) to use for a field.

array
getEditorAttachments(array $editor_ids)

Returns the attachments for all editors.

Details

string|null getEditor(string $formatter_type, FieldItemListInterface $items)

Returns the in-place editor (an InPlaceEditor plugin) to use for a field.

Parameters

string $formatter_type

The field's formatter type name.

FieldItemListInterface $items

The field values to be in-place edited.

Return Value

string|null

The editor to use, or NULL to not enable in-place editing.

array getEditorAttachments(array $editor_ids)

Returns the attachments for all editors.

Parameters

array $editor_ids

A list of all in-place editor IDs that should be attached.

Return Value

array

An array of attachments, for use with #attached.

See also

AttachmentsResponseProcessorInterface::processAttachments