CRM-11856 - Update custom values when option values are modified
[civicrm-core.git] / api / v3 / MembershipStatus.php
index 12de92c8d712b6abee23df910cc98799e3db9f0b..8add1ae2ac8de0a32aceaaa33b0f8a2849ae79e0 100644 (file)
@@ -1,10 +1,9 @@
 <?php
-
 /*
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  */
 
 /**
- * File for the CiviCRM APIv3 membership status functions
+ * This api exposes CiviCRM membership status.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_Membership
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: MembershipStatus.php 30171 2010-10-14 09:11:27Z mover $
- *
  */
 
 /**
- * Create a Membership Status
- *
- * This API is used for creating a Membership Status
+ * Create a Membership Status.
  *
  * @param array $params
- *   An associative array of name/value property values of civicrm_membership_status.
+ *   Array of name/value property values of civicrm_membership_status.
  *
  * @return array
-   *   of newly created membership status property values.
- * {@getfields MembershipStatus_create}
- * @access public
  */
 function civicrm_api3_membership_status_create($params) {
   return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
@@ -62,30 +51,28 @@ function civicrm_api3_membership_status_create($params) {
  * @param array $params
  *   An associative array of name/value property values of civicrm_membership_status.
  *
- * @return Array
-   *   of all found membership status property values.
- * {@getfields MembershipStatus_get}
- * @access public
+ * @return array
+ *   Array of all found membership status property values.
  */
 function civicrm_api3_membership_status_get($params) {
   return _civicrm_api3_basic_get('CRM_Member_BAO_MembershipStatus', $params);
 }
 
 /**
- * Update an existing membership status
+ * Update an existing membership status.
  *
  * This api is used for updating an existing membership status.
- * Required parameters : id of a membership status
+ * Required parameters: id of a membership status
  *
  * @param array $params
- *   An associative array of name/value property values of civicrm_membership_status.
+ *   Array of name/value property values of civicrm_membership_status.
+ *
  * @deprecated - should just use create
  *
  * @return array
-   *   of updated membership status property values
- * @access public
+ *   Array of updated membership status property values
  */
-function &civicrm_api3_membership_status_update($params) {
+function civicrm_api3_membership_status_update($params) {
 
   civicrm_api3_verify_mandatory($params, NULL, array('id'));
   //don't allow duplicate names.
@@ -116,16 +103,13 @@ function &civicrm_api3_membership_status_update($params) {
 }
 
 /**
- * Deletes an existing membership status
+ * Deletes an existing membership status.
  *
  * This API is used for deleting a membership status
  *
- * @param array Params array containing 'id' - Id of the membership status to be deleted
- * {@getfields MembershipStatus_delete}
+ * @param array $params
  *
  * @return array
-   *   i
- * @access public
  */
 function civicrm_api3_membership_status_delete($params) {
 
@@ -134,7 +118,7 @@ function civicrm_api3_membership_status_delete($params) {
 }
 
 /**
- * Derives the Membership Status of a given Membership Reocrd
+ * Derives the Membership Status of a given Membership Record.
  *
  * This API is used for deriving Membership Status of a given Membership
  * record using the rules encoded in the membership_status table.
@@ -143,9 +127,8 @@ function civicrm_api3_membership_status_delete($params) {
  *
  * @throws API_Exception
  *
- * @return Array
-   *   Array of status id and status name
- * @public
+ * @return array
+ *   Array of status id and status name
  */
 function civicrm_api3_membership_status_calc($membershipParams) {
   if (!($membershipID = CRM_Utils_Array::value('membership_id', $membershipParams))) {
@@ -179,4 +162,3 @@ SELECT start_date, end_date, join_date, membership_type_id
   $dao->free();
   return $result;
 }
-