function ggroup_group_content_delete in Subgroup (Graph) 1.0.x
Implements hook_ENTITY_TYPE_delete().
File
- ./
ggroup.module, line 45 - Enables Subgroup functionality.
Code
function ggroup_group_content_delete(GroupContentInterface $group_content) {
if ($group_content
->getContentPlugin()
->getEntityTypeId() !== 'group') {
return;
}
\Drupal::service('ggroup.group_hierarchy_manager')
->removeSubgroup($group_content);
}