Closed (fixed)
Project:
Group
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Feb 2017 at 18:34 UTC
Updated:
8 Sep 2023 at 14:17 UTC
Jump to comment: Most recent
Can you point us in the right direction? To add all existing nodes to a group, for example?
Comments
Comment #2
maxilein commentedI'd be interested in that, too.
To me it is a critical question in order to find out how to migrate an existing site to the intriguing idea of the group module.
Comment #3
kristiaanvandeneyndeWell, you need a GroupContent entity for every Node belonging to a Group, so my advice would be to use the API that's available: GroupInterface::addContent()
The steps to take are roughly:
$group->addContent($node, 'group_node:NODE_TYPE_HERE');Comment #4
kristiaanvandeneyndeEither that, or you set up your migration in three steps:
But that would require more thorough knowledge of the Group module's internals.
Comment #5
Anonymous (not verified) commentedabout #3 - if using $group->addContent($node, 'group_node:NODE_TYPE_HERE');
It works fine - thanks .
Comment #7
socialnicheguru commentedis there a relationship via dynamic entityrelationship or some other module that we can use?
Comment #8
weri commentedPossible module: https://www.drupal.org/project/group_action