version fixes
[civicrm-core.git] / api / v3 / Note.php
index 47d64a93457ffa994880bc15eb13672e8c0e95fe..85922e056d340ed6a826efffadac7539d5707174 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  */
 
 /**
- * File for the CiviCRM APIv3 note functions
+ * This api exposes CiviCRM note.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_Note
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: Note.php 30879 2010-11-22 15:45:55Z shot $
- *
  */
 
 /**
- * Create Note
+ * Create Note.
  *
  * This API is used for creating a note.
  * Required parameters : entity_id AND note
  *
  * @param array $params
  *   An associative array of name/value property values of civicrm_note.
- * {@getfields note_create}
  *
  * @return array
  *   API result array
@@ -54,11 +48,12 @@ function civicrm_api3_note_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_note_create_spec(&$params) {
   $params['entity_table']['api.default'] = "civicrm_contact";
@@ -68,24 +63,22 @@ function _civicrm_api3_note_create_spec(&$params) {
 }
 
 /**
- * Deletes an existing note
+ * Deletes an existing note.
  *
  * This API is used for deleting a note
  *
  * @param array $params
  *   Including id of the note to be deleted.
- * {@getfields note_delete}
  *
- * @return null
+ * @return array
  */
 function civicrm_api3_note_delete($params) {
-
   $result = new CRM_Core_BAO_Note();
   return $result->del($params['id']) ? civicrm_api3_create_success() : civicrm_api3_create_error('Error while deleting Note');
 }
 
 /**
- * Retrieve a specific note, given a set of input params
+ * Retrieve a specific note or notes, given a set of input params.
  *
  * @param array $params
  *   Input parameters.
@@ -93,36 +86,33 @@ function civicrm_api3_note_delete($params) {
  * @return array
  *   array of properties,
  *   if error an array with an error id and error message
- *
- *   {@getfields note_get}
  */
 function civicrm_api3_note_get($params) {
-
   return _civicrm_api3_basic_get('CRM_Core_BAO_Note', $params);
 }
 
 /**
- * Adjust Metadata for Get action
+ * Adjust Metadata for Get 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_note_get_spec(&$params) {
   $params['entity_table']['api.default'] = "civicrm_contact";
 }
 
 /**
- * Get all descendents of given note
+ * Get all descendants of given note.
  *
  * @param array $params
- *   Associative array; only required 'id' parameter is used.
+ *   array; only required 'id' parameter is used.
  *
  * @return array
  *   Nested associative array beginning with direct children of given note.
  */
 function &civicrm_api3_note_tree_get($params) {
-
   civicrm_api3_verify_mandatory($params, NULL, array('id'));
 
   if (!is_numeric($params['id'])) {