Merge pull request #5054 from eileenmcnaughton/comments
[civicrm-core.git] / api / v3 / Note.php
index 73059ca3a42ebfa21d8aa9641d481b345208bc21..0b1e379f68df4a1edd90a09d638d2403e6039df0 100644 (file)
@@ -1,8 +1,7 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  *
  */
 
-/**
- * Files required for this package
- */
-
 /**
  * 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
+ * @param array $params
+ *   An associative array of name/value property values of civicrm_note.
  * {@getfields note_create}
  *
- * @return array API result array
- * @access public
- * @example NoteCreate.php Create example
- *
- *
+ * @return array
+ *   API result array
  */
 function civicrm_api3_note_create($params) {
   return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
 }
 
 /**
- * Adjust Metadata for Create action
+ * Adjust Metadata for Create action.
  *
- * The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * The metadata is used for setting defaults, documentation & validation.
+ *
+ * @param array $params
+ *   Array or parameters determined by getfields.
  */
 function _civicrm_api3_note_create_spec(&$params) {
   $params['entity_table']['api.default'] = "civicrm_contact";
@@ -78,13 +73,11 @@ function _civicrm_api3_note_create_spec(&$params) {
  *
  * This API is used for deleting a note
  *
- * @params  array  $paramsarray including id of the note to be deleted
+ * @param array $params
+ *   Including id of the note to be deleted.
  * {@getfields note_delete}
  *
- * @param $params
- *
  * @return null
- * @access public
  */
 function civicrm_api3_note_delete($params) {
 
@@ -95,13 +88,14 @@ function civicrm_api3_note_delete($params) {
 /**
  * Retrieve a specific note, given a set of input params
  *
- * @param  array   $params  input parameters
+ * @param array $params
+ *   Input parameters.
+ *
+ * @return array
+ *   array of properties,
+ *   if error an array with an error id and error message
  *
- * @return array  array of properties,
- * if error an array with an error id and error message
- * {@getfields note_get}
- * @static void
- * @access public
+ *   {@getfields note_get}
  */
 function civicrm_api3_note_get($params) {
 
@@ -111,8 +105,10 @@ function civicrm_api3_note_get($params) {
 /**
  * Adjust Metadata for Get action
  *
- * The metadata is used for setting defaults, documentation & validation
- * @param array $params array or parameters determined by getfields
+ * The metadata is used for setting defaults, documentation & validation.
+ *
+ * @param array $params
+ *   Array or parameters determined by getfields.
  */
 function _civicrm_api3_note_get_spec(&$params) {
   $params['entity_table']['api.default'] = "civicrm_contact";
@@ -121,9 +117,11 @@ function _civicrm_api3_note_get_spec(&$params) {
 /**
  * Get all descendents of given note
  *
- * @param array $params Associative array; only required 'id' parameter is used
+ * @param array $params
+ *   Associative array; only required 'id' parameter is used.
  *
- * @return array Nested associative array beginning with direct children of given note.
+ * @return array
+ *   Nested associative array beginning with direct children of given note.
  */
 function &civicrm_api3_note_tree_get($params) {
 
@@ -141,4 +139,3 @@ function &civicrm_api3_note_tree_get($params) {
   $noteTree = CRM_Core_BAO_Note::getNoteTree($params['id'], $params['max_depth'], $params['snippet']);
   return civicrm_api3_create_success($noteTree, $params);
 }
-