If you define an entity type that uses bundle plugins, then you don't get a field UI for it.

That means you can't add config fields, but also you can't change widgets or formatters or the display order for the base and bundle fields.
Even if you don't want to expose that functionality to site builders, it's very useful when developing to be able to configure your base and bundle fields in the UI, then export the config and use that to tweak the code that defines the fields.

I'm proposing to do this on top of the core issue to provide entity links handlers, since it will remove a LOT of boilerplate: #2976861: add an entity Links handler, to provide menu links/tasks/actions for entity types.

Comments

joachim created an issue. See original summary.

joachim’s picture

Status: Active » Needs review
StatusFileSize
new8.95 KB

Needs a little bit more work:

- class docs need tidying up
- needs integrating with the existing route providers in this module. I'm not sure how best to do that
- the presence of a links provider here clashes somewhat with the 'add local action' classes.
- would be nice to kill the dummy route's link in the breadcrumb, so it's not reachable from anywhere in the UI

joachim’s picture

I've generalised this code some more since posting this patch -- see https://www.drupal.org/project/entity_admin_handlers

bojanz’s picture

@joachim
#2 makes sense at a glance.
I would gladly merge the entire entity_admin_handlers functionality into entity.
We'd need to rebase it to work with this module's local task/action providers though.

Interested in rolling another patch?