getfields api - ensure 'name' property is set for every field
[civicrm-core.git] / api / v3 / ContributionSoft.php
index 8d159beb3a1a1774525f089dcc13e1ad6ba725bc..8d6187cf7c07f9a2c575b46d520efd83ac22cba3 100644 (file)
@@ -1,6 +1,4 @@
 <?php
-// $Id$
-
 /*
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
- * File for the CiviCRM APIv3 soft credit functions
+ * File for the CiviCRM APIv3 soft credit functions.
  *
  * @package CiviCRM_APIv3
  * @subpackage API_ContributionSoft
  */
 
 /**
- * Create or Update a Soft Credit
+ * Create or Update a Soft Credit.
  *
  * @param array $params
- *   Associative array of property.
- *                       name/value pairs to insert in new 'contribution_soft'
- *
- * @example ContributionSoftCreate.php Standard Create Example //FIXME
+ *   Array per getfields metadata.
  *
  * @return array
  *   API result array
- * {@getfields contribution_soft_create}
- * @access public
  */
 function civicrm_api3_contribution_soft_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.
  *
- * The metadata is used for setting defaults, documentation & validation
  * @param array $params
  *   Array or parameters determined by getfields.
  */
@@ -69,38 +63,24 @@ function _civicrm_api3_contribution_soft_create_spec(&$params) {
 }
 
 /**
- * Deletes an existing Soft Credit
+ * Deletes an existing Soft Credit.
  *
  * @param array $params
- *
- * @example ContributionSoftDelete.php Standard Delete Example
- *
- * @return boolean
- *   | error  true if successfull, error otherwise
- * {@getfields contribution_soft_delete}
- * @access public
  */
 function civicrm_api3_contribution_soft_delete($params) {
-  // non standard BAO - we have to write custom code to cope
+  // Non standard BAO - we have to write custom code to cope.
   CRM_Contribute_BAO_ContributionSoft::del(array('id' => $params['id']));
 
 }
 
 /**
- * Retrieve one or more Soft Credits
- *
- * @param array input parameters
- *
- *
- * @example ContributionSoftGet.php Standard Get Example
+ * Retrieve one or more Soft Credits.
  *
  * @param array $params
- *   An associative array of name/value pairs.
+ *   Array per getfields metadata.
  *
  * @return array
- *   api result
- * {@getfields contribution_soft_get}
- * @access public
+ *   API result
  */
 function civicrm_api3_contribution_soft_get($params) {
   return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);