3 namespace Drupal\quickedit;
5 use Drupal\Core\Field\FieldItemListInterface;
8 * Interface for selecting an in-place editor (an Editor plugin) for a field.
10 interface EditorSelectorInterface {
13 * Returns the in-place editor (an InPlaceEditor plugin) to use for a field.
15 * @param string $formatter_type
16 * The field's formatter type name.
17 * @param \Drupal\Core\Field\FieldItemListInterface $items
18 * The field values to be in-place edited.
21 * The editor to use, or NULL to not enable in-place editing.
23 public function getEditor($formatter_type, FieldItemListInterface $items);
26 * Returns the attachments for all editors.
28 * @param array $editor_ids
29 * A list of all in-place editor IDs that should be attached.
32 * An array of attachments, for use with #attached.
34 * @see \Drupal\Core\Render\AttachmentsResponseProcessorInterface::processAttachments()
36 public function getEditorAttachments(array $editor_ids);