Problem/Motivation
Currently, it is impossible to suppy theme hook like suggestions (i.e. container__my_suggestion) to #type.
If this functionality is needed, one must determine which #theme or #theme_wrappers the element uses and then supply them manually in the render array element.
This causes a lot of technical debt and requires the developer to know the internals of the element type.
Proposed resolution
Allow #type to process theme hook suggestions and then dynamically apply them to the appropriate #theme or #theme_wrappers properies.
Remaining tasks
- Create tests
- Create a patch
User interface changes
None
API changes
The #type property in render arrays will now be able to process theme hook like suggestions.
Data model changes
None
Comments
Comment #2
markhalliwell