Problem/Motivation
Some want to use arbitrary entitiy types as groups (as it was possible in OG).
Looking into the code, the group interface only has helper methods, besides one (iirc getChangedTimestamp), so no need to enforce that a group is of a specific entity type.
The main approach to purpue this well tested: Commerce allows OrderItems to reference arbitrary entityTypes as purchasable Entity, by overriding the reference field definition per bundle.
For group module this means: Define a target entityType and bundle(s) per groupType, alter the corresponding groupReference of groupContent.
Unfortunately there are quite a lot of places in the module where GroupInterface is typehinted.
Changing all that to ContentEntity is a BC challenge.
The other approach is to make Group essentially a wrapper around arbitrary ContentEntities.
Proposed resolution
- Imitate the purchasableEntity approach from commerce.
- Weed out the BC.
Remaining tasks
The main challenge is likely to juggle BC.
Maybe a non-bc fork/patch can help to get an overview of how to tacke this.
User interface changes
None
API changes
Some
Data model changes
Group content references entities of configured entity type as group.
Draft CR
Any entity bundle can now act as group.
Comments
Comment #2
geek-merlinComment #3
geek-merlinComment #4
geek-merlinComment #5
kristiaanvandeneyndeNot sure I want to go down this road as that's essentially one of the main reasons I wrote Group: The fact that OG did not have a dedicated data storage to represent the notion of a group.