Add an implementation of EntityDisplayBase::label()

Created on 27 January 2018, over 6 years ago
Updated 30 January 2023, over 1 year ago

Problem/Motivation

Neither EntityFormDisplay nor EntityViewDisplay have a label key, and as such their ::label() method returns NULL.

Proposed resolution

Implement ::label(), returning a string indicating which entity type, bundle, and view mode are represented.

Remaining tasks

Decide on the string to present and then use it in the Field UI.

User interface changes

Steps to check the label with the Layout builder module installed first:

Node:【Structure】->【Content types】->【Article】->【Manage Display】->【Default】/【Teaser】mode ->【 Use Layout Builder】->【Manage Layout】

User:【Configuration】->【Account Settings】->【Manage Display】->【Default】mode ->【 Use Layout Builder】->【Manage Layout】

API changes

Data model changes

📌 Task
Status

Needs work

Version

10.1

Component
Entity 

Last updated about 4 hours ago

Created by

🇺🇸United States tim.plunkett Philadelphia

Live updates comments and jobs are added and updated live.
  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

Production build 0.71.5 2024