I have encountered the need to use an existing custom entity as a group that can have content. Working on it, it seems possible by having the entity implementing GroupInterface
, but diving deeper it became obvious that it is a lot of work. From adding custom group content type/content/role entities, updating a lot of forms and access handlers where a lot of entity IDs or database tables are hardcoded etc. It'd be the ideal solution for my case, but it's a lot of work, it will require a lot of testing, and potentially more maintenance to follow future changes in the main Group module.
There is an alternative easier solution to create a group type for the existing Group entity, and maintain an association with the custom entity e.g. create a group when a new entity is created, UI manipulations so that everything is as if there is one entity for admins/visitors etc. Less work, but it can potentially cause other headaches in my case and it can potentially have worse performance.
Does anybody have experience with custom group entities? Is there interest to review the architecture of the module, and see if there is a way to refactor the existing code so that we maximise reusability of code/functionality e.g. using traits etc. for group/content entities with different entity IDs?
If there's an interest from module maintainers I can create a fork/branch and start playing with it. Otherwise I can review if something can be done as a separate module.
Needs work
4.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.