You are here

function _og_subgroups_get_group_siblings_recursive in Subgroups for Organic groups 6

Recursive callback to help determine the siblings of a given group

1 call to _og_subgroups_get_group_siblings_recursive()
og_subgroups_get_group_siblings in includes/tree.inc
Determine the siblings of a given group

File

includes/tree.inc, line 395
Functions to generate and use the group hierarchy trees

Code

function _og_subgroups_get_group_siblings_recursive($group, $branch) {
  if (isset($branch->children[$group->nid])) {
    return $branch->children;
  }
  else {
    if (is_array($branch->children)) {
      return _og_subgroups_get_group_siblings_recursive($group, $branch->children);
    }
  }
}