You are here

public function MetadataGeneratorInterface::generateFieldMetadata in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/quickedit/src/MetadataGeneratorInterface.php \Drupal\quickedit\MetadataGeneratorInterface::generateFieldMetadata()

Generates in-place editing metadata for an entity field.

Parameters

\Drupal\Core\Field\FieldItemListInterface $items: The field values to be in-place edited.

string $view_mode: The view mode the field should be rerendered in.

Return value

array An array containing metadata with the following keys:

  • label: the user-visible label for the field.
  • access: whether the current user may edit the field or not.
  • editor: which editor should be used for the field.
  • aria: the ARIA label.
  • custom: (optional) any additional metadata that the editor provides.
1 method overrides MetadataGeneratorInterface::generateFieldMetadata()
MetadataGenerator::generateFieldMetadata in core/modules/quickedit/src/MetadataGenerator.php
Generates in-place editing metadata for an entity field.

File

core/modules/quickedit/src/MetadataGeneratorInterface.php, line 41

Class

MetadataGeneratorInterface
Interface for generating in-place editing metadata.

Namespace

Drupal\quickedit

Code

public function generateFieldMetadata(FieldItemListInterface $items, $view_mode);