Add Bundle info to entity_get_info()

Created on 29 October 2017, over 7 years ago
Updated 20 May 2025, about 5 hours ago

Problem/Motivation

Hey there, simple problem/fix for D7.

redirect_entity_simple entity doesn't define a 'bundles' array, but it does define ['entity keys']['bundle']. entity_get_info() is pretty explicit about this:

// If no bundle key is provided, assume a single bundle, named after
// the entity type.

Proposed resolution

We could refactor to define ['bundles']['redirect'] with ['label'] and ['admin']['path'] and ['access arguments'] etc, but unless there's value in that it's easier to just omit ['entity keys']['bundle'].

Remaining tasks

Review/commit patch - or just leave issue for our reference :)

User interface changes

None

API changes

Will include Bundle info in return value of entity_get_info().

Data model changes

None.

✨ Feature request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States scottrigby Brooklyn, NY

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the 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.

Production build 0.71.5 2024