Problem/Motivation

In #3534587: Deprecate node_type_get_names we added EntityBundleInfo::getBundleLabels to streamline getting a list of bundle labels for an entity type. This can be used in various places in core to reduce duplication.

One place is MediaEmbed::settingsForm, there are probably other places.

Proposed resolution

Replace usages of getBundleInfo that map bundles to an array of labels to use getBundleLabels

Remaining tasks

Review

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

None

Issue fork drupal-3544730

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

catch’s picture

Title: [PP-1] Use EntityBundleInfo::getBundleLabels in MediaEmbed::SettingsForm and elsewhere » Use EntityBundleInfo::getBundleLabels in MediaEmbed::SettingsForm and elsewhere

dtrdewaele made their first commit to this issue’s fork.

acbramley’s picture

Status: Active » Reviewed & tested by the community

Beauty, thanks!

acbramley’s picture

Status: Reviewed & tested by the community » Needs work

Checking other spots we can use this actually.

acbramley’s picture

Status: Needs work » Needs review

Found a few more easy replacements

acbramley’s picture

Issue summary: View changes
dtrdewaele’s picture

Yeah planned to find other places today, but you were faster :)

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a good refactor!

  • catch committed 52f3a2e0 on 11.x
    Issue #3544730 by acbramley, dtrdewaele: Use EntityBundleInfo::...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.