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

geek-merlin created an issue. See original summary.

geek-merlin’s picture

Category: Feature request » Task
Issue summary: View changes
geek-merlin’s picture

Title: End the Group Shism: Allow any entity type as group » Allow any entity type as group
geek-merlin’s picture

Project: Geek Merlin's Issue Incubator » Group
Version: » 2.0.x-dev
kristiaanvandeneynde’s picture

Not 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.