X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FReportTemplate.php;h=bf0cea90d712461df70137438d4f910999662a95;hb=44994b86e25125c315112fd6f6cef948fbb0b170;hp=13dd158bd38dc063a2733ac9fba59260e4710d72;hpb=6ce4af3b24412a26d866718fc4030ed74e66d1ac;p=civicrm-core.git diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index 13dd158bd3..bf0cea90d7 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -1,18 +1,45 @@ preProcess(); $reportInstance->setDefaultValues(FALSE); $reportInstance->setParams(array_merge($reportInstance->getDefaultValues(), $params)); - $options = _civicrm_api3_get_options_from_params($params, TRUE, 'report_template', 'get'); + $options = _civicrm_api3_get_options_from_params($params, TRUE, 'ReportTemplate', 'get'); $reportInstance->setLimitValue($options['limit']); $reportInstance->setOffsetValue($options['offset']); $reportInstance->beginPostProcessCommon(); @@ -150,6 +172,8 @@ function _civicrm_api3_report_template_getrows($params) { } /** + * Get statistics from a given report. + * * @param array $params * * @return array @@ -157,16 +181,13 @@ function _civicrm_api3_report_template_getrows($params) { function civicrm_api3_report_template_getstatistics($params) { list($rows, $reportInstance, $metadata) = _civicrm_api3_report_template_getrows($params); $stats = $reportInstance->statistics($rows); - return civicrm_api3_create_success($stats, $params, 'report_template', 'getstatistics', CRM_Core_DAO::$_nullObject, $metadata); + return civicrm_api3_create_success($stats, $params, 'ReportTemplate', 'getstatistics', CRM_Core_DAO::$_nullObject, $metadata); } /** - * Retrieve rows from a report template + * Adjust metadata for template getrows action. * * @param array $params * Input parameters. - * - * @return void - * details of found instances */ function _civicrm_api3_report_template_getrows_spec(&$params) { $params['report_id'] = array(