Api docblock cleanup.
[civicrm-core.git] / api / v3 / ReportTemplate.php
index a4691c634d59dba5a2f2f426c741d0a2bd611a53..1c21ded0b41cabaaabc44b904c5979ca2338c4a4 100644 (file)
@@ -1,19 +1,45 @@
 <?php
+/*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 4.6                                                |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+ */
+
+/**
+ * This api exposes CiviCRM report templates.
+ *
+ * @package CiviCRM_APIv3
+ */
 
 /**
- * Retrieve a report template
+ * Retrieve a report template.
  *
  * FIXME This is a bare-minimum placeholder
  *
  * @param array $params
  *
- * {@example OptionValueGet.php 0}
- * @example OptionValueGet.php
- *
  * @return array
-   *   details of found Option Values
- * {@getfields OptionValue_get}
- * @access public
+ *   details of found Option Values
  */
 function civicrm_api3_report_template_get($params) {
   require_once 'api/v3/OptionValue.php';
@@ -24,18 +50,14 @@ function civicrm_api3_report_template_get($params) {
 }
 
 /**
- *  Add a OptionValue. OptionValues are used to classify CRM entities (including Contacts, Groups and Actions).
- *
- * Allowed @params array keys are:
+ * Add an OptionValue.
  *
- * {@example OptionValueCreate.php}
+ * OptionValues are used to classify CRM entities (including Contacts, Groups and Actions).
  *
  * @param array $params
  *
  * @return array
-   *   of newly created option_value property values.
- * {@getfields OptionValue_create}
- * @access public
+ *   Array of newly created option_value property values.
  */
 function civicrm_api3_report_template_create($params) {
   require_once 'api/v3/OptionValue.php';
@@ -50,11 +72,12 @@ function civicrm_api3_report_template_create($params) {
 }
 
 /**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
+ *
+ * The metadata is used for setting defaults, documentation & validation.
  *
- * The metadata is used for setting defaults, documentation & validation
  * @param array $params
- *   Array or parameters determined by getfields.
+ *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_report_template_create_spec(&$params) {
   require_once 'api/v3/OptionValue.php';
@@ -68,16 +91,12 @@ function _civicrm_api3_report_template_create_spec(&$params) {
 }
 
 /**
- * Deletes an existing ReportTemplate
+ * Deletes an existing ReportTemplate.
  *
  * @param array $params
  *
- * {@example ReportTemplateDelete.php 0}
- *
  * @return array
-   *   Api result
- * {@getfields ReportTemplate_create}
- * @access public
+ *   Api result
  */
 function civicrm_api3_report_template_delete($params) {
   require_once 'api/v3/OptionValue.php';
@@ -85,14 +104,13 @@ function civicrm_api3_report_template_delete($params) {
 }
 
 /**
- * Retrieve rows from a report template
+ * Retrieve rows from a report template.
  *
  * @param array $params
  *   Input parameters.
  *
  * @return array
-   *   details of found instances
- * @access public
+ *   details of found instances
  */
 function civicrm_api3_report_template_getrows($params) {
   civicrm_api3_verify_one_mandatory($params, NULL, array('report_id', 'instance_id'));
@@ -101,6 +119,8 @@ function civicrm_api3_report_template_getrows($params) {
 }
 
 /**
+ * Get report template rows.
+ *
  * @param array $params
  *
  * @return array
@@ -113,7 +133,7 @@ function _civicrm_api3_report_template_getrows($params) {
   }
 
   $class = civicrm_api3('option_value', 'getvalue', array(
-    'option_group_id' => 'report_template',
+    'option_group_name' => 'report_template',
     'return' => 'name',
     'value' => $params['report_id'],
     )
@@ -153,6 +173,8 @@ function _civicrm_api3_report_template_getrows($params) {
 }
 
 /**
+ * Get statistics from a given report.
+ *
  * @param array $params
  *
  * @return array
@@ -163,14 +185,10 @@ function civicrm_api3_report_template_getstatistics($params) {
   return civicrm_api3_create_success($stats, $params, 'report_template', '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 +196,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 +293,5 @@ function civicrm_api3_report_template_getfields($params) {
       'default' => 'UL',
     ),
   ));
-}*/
+}
+@codingStandardsIgnoreEnd */