You are here

function og_subgroups_hs_hierarchical_select_entity_count in Subgroups for Organic groups 6

Implementation of hook_hierarchical_select_entity_count().

File

modules/og_subgroups_hs/og_subgroups_hs.module, line 207
Implementation of the Hierarchical Select API for the OG Subgroups module.

Code

function og_subgroups_hs_hierarchical_select_entity_count($item, $params) {
  og_subgroups_include('tree');

  // Build the group object
  $group = new stdClass();
  $group->nid = $item;

  // Get the children of the group
  $children = og_subgroups_get_group_children($group);
  return count($children);
}