You are here

public function MetadataGeneratorInterface::generateEntityMetadata in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/quickedit/src/MetadataGeneratorInterface.php \Drupal\quickedit\MetadataGeneratorInterface::generateEntityMetadata()
  2. 10 core/modules/quickedit/src/MetadataGeneratorInterface.php \Drupal\quickedit\MetadataGeneratorInterface::generateEntityMetadata()

Generates in-place editing metadata for an entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity, in the language in which one of its fields is being edited.

Return value

array An array containing metadata with the following keys:

  • label: the user-visible label for the entity in the given language.
1 method overrides MetadataGeneratorInterface::generateEntityMetadata()
MetadataGenerator::generateEntityMetadata in core/modules/quickedit/src/MetadataGenerator.php
Generates in-place editing metadata for an entity.

File

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

Class

MetadataGeneratorInterface
Interface for generating in-place editing metadata.

Namespace

Drupal\quickedit

Code

public function generateEntityMetadata(EntityInterface $entity);