+ $groupTypeIds = array();
+ $groupType = CRM_Utils_Array::value('group_type', $params);
+ if (is_array($groupType)) {
+ foreach ($groupType as $type => $selected) {
+ if ($selected) {
+ $groupTypeIds[] = $type;
+ }
+ }
+ }
+ $params['group_type'] = $groupTypeIds;
+