value pairs. If $params is set. * as null, all price_sets will be returned (default limit is 25) * * @return array * Array of matching price_sets */ function civicrm_api3_price_set_get($params) { // hack to make getcount work. - not sure the best approach here // as creating an alternate getcount function also feels a bit hacky if (isset($params['options']) && isset($params['options']['is_count'])) { return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params); } $result = _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, FALSE); // Fetch associated entities foreach ($result as &$item) { $item['entity'] = CRM_Price_BAO_PriceSet::getUsedBy($item['id'], 'entity'); } return civicrm_api3_create_success($result, $params); } /** * Delete an existing PriceSet. * * This method is used to delete any existing PriceSet given its id. * * @param array $params * Array containing id of the group to be deleted. * * @return array * API result array */ function civicrm_api3_price_set_delete($params) { return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params); }