X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FReportTemplate.php;h=bf0cea90d712461df70137438d4f910999662a95;hb=44994b86e25125c315112fd6f6cef948fbb0b170;hp=7df1de3359d1af4e3ed1b73266a46543b19aeccc;hpb=d36b8b20ac964dc3c0a74f98f580dc7b0ad7383e;p=civicrm-core.git diff --git a/api/v3/ReportTemplate.php b/api/v3/ReportTemplate.php index 7df1de3359..bf0cea90d7 100644 --- a/api/v3/ReportTemplate.php +++ b/api/v3/ReportTemplate.php @@ -1,19 +1,45 @@ 'report_template', + 'option_group_name' => 'report_template', 'return' => 'name', 'value' => $params['report_id'], ) @@ -128,7 +147,7 @@ function _civicrm_api3_report_template_getrows($params) { $reportInstance->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(); @@ -153,6 +172,8 @@ function _civicrm_api3_report_template_getrows($params) { } /** + * Get statistics from a given report. + * * @param array $params * * @return array @@ -160,17 +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 array - * details of found instances - * @access public */ function _civicrm_api3_report_template_getrows_spec(&$params) { $params['report_id'] = array( @@ -178,7 +195,7 @@ function _civicrm_api3_report_template_getrows_spec(&$params) { ); } -/* +/* @codingStandardsIgnoreStart function civicrm_api3_report_template_getfields($params) { return civicrm_api3_create_success(array( 'id' => array( @@ -275,4 +292,5 @@ function civicrm_api3_report_template_getfields($params) { 'default' => 'UL', ), )); -}*/ +} +@codingStandardsIgnoreEnd */