Merge remote-tracking branch 'origin/4.5' into 4.5-master-2015-02-24-17-24-05
[civicrm-core.git] / api / v3 / examples / ReportTemplate / Getrows.php
index f46d10c63e1edf6be9c9700739f733962b6dccbf..50d64613338d0e724a4f2af91ffdf41d107c9e70 100644 (file)
@@ -1,14 +1,8 @@
 <?php
 /**
- * @file
- * Test Generated API Example.
- * See bottom of this file for more detail.
- */
-
-/**
- * Test Generated example of using report_template getrows API.
+ * Test Generated example demonstrating the ReportTemplate.getrows API.
  *
- * Retrieve rows from a report template (optionally providing the instance_id)
+ * Retrieve rows from a report template (optionally providing the instance_id).
  *
  * @return array
  *   API result array
@@ -25,7 +19,7 @@ function report_template_getrows_example() {
   );
 
   try{
-    $result = civicrm_api3('report_template', 'getrows', $params);
+    $result = civicrm_api3('ReportTemplate', 'getrows', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -76,11 +70,10 @@ function report_template_getrows_expectedresult() {
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testReportTemplateGetRowsContactSummary
-* and can be found in
+* The test that created it is called "testReportTemplateGetRowsContactSummary"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ReportTemplateTest.php
 *
 * You can see the outcome of the API tests at
@@ -90,7 +83,7 @@ function report_template_getrows_expectedresult() {
 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
 *
 * Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
+* http://MYSITE.ORG/path/to/civicrm/api
 *
 * Read more about testing here
 * http://wiki.civicrm.org/confluence/display/CRM/Testing