function social_group_group_content_update in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8.2 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8.3 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8.4 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8.5 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8.6 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 8.7 modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 10.0.x modules/social_features/social_group/social_group.module \social_group_group_content_update()
- 10.1.x modules/social_features/social_group/social_group.module \social_group_group_content_update()
When updating a group membership.
Parameters
\Drupal\group\Entity\GroupContentInterface $group_content: The group content.
File
- modules/
social_features/ social_group/ social_group.module, line 935 - The Social group module.
Code
function social_group_group_content_update(GroupContentInterface $group_content) {
if ($group_content
->getEntity()
->getEntityTypeId() == 'user') {
if ($group_content
->bundle() == $group_content
->getGroup()
->bundle() . '-group_membership') {
_social_group_grant_admin_role($group_content
->getEntity()
->id(), $group_content
->getGroup()
->id());
}
}
}