function MetadataGenerator::generateEntityMetadata

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

Overrides MetadataGeneratorInterface::generateEntityMetadata

File

core/modules/quickedit/src/MetadataGenerator.php, line 56

Class

MetadataGenerator
Generates in-place editing metadata for an entity field.

Namespace

Drupal\quickedit

Code

public function generateEntityMetadata(EntityInterface $entity) {
    return [
        'label' => $entity->label(),
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.