MetadataGeneratorInterface::generateFieldMetadata

public MetadataGeneratorInterface::generateFieldMetadata(FieldItemListInterface $items, $view_mode)

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.

File

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

Class

MetadataGeneratorInterface
Interface for generating in-place editing metadata.

Namespace

Drupal\quickedit

Code

public function generateFieldMetadata(FieldItemListInterface $items, $view_mode);
doc_Drupal
2016-10-29 09:28:25
Comments
Leave a Comment

Please login to continue.