$group) { $groups[$id]['member_count'] = CRM_Contact_BAO_Group::memberCount($id); } return civicrm_api3_create_success($groups, $params, 'group', 'get'); } /** * Delete an existing group. * * @param array $params * [id] * * @return array * API result array */ function civicrm_api3_group_delete($params) { CRM_Contact_BAO_Group::discard($params['id']); return civicrm_api3_create_success(TRUE); }