You are here

function og_subgroups_get_sql_args in Subgroups for Organic groups 5.3

1 call to og_subgroups_get_sql_args()
og_subgroups_selective_groups_options in ./og_subgroups.module

File

./og_subgroups.module, line 265
Maintains a hierarchy of group/subgroup relationships.

Code

function og_subgroups_get_sql_args($type) {
  if (empty($type)) {
    $types = variable_get('og_node_types', array(
      'og',
    ));
  }
  else {
    $types = variable_get('og_subgroups_' . $type . '_parents', array());
  }
  $in = implode(', ', array_fill(0, count($types), "'%s'"));
  return array(
    $types,
    $in,
  );
}