Problem/Motivation
When a user is using the IEF comple widget to add an entity, they first have to select a bundle. The list of bundles is sorted alphabetically.
Proposed resolution
Use ConfigEntityBase::sort() as a sort helper to sort the bundles in their preferred way, which may include a weight as well as their label, or something more specific to the bundle entity type.
A slight catch is that not all bundles are backed by config entities, so the code would need to be cautious.
Comments