X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FCustomValue.php;h=f7ef22ff9a5fbcd67f863903a5d98198aeec8c2c;hb=4846df9154866b0a33ee8ec7a1f48c65c77b670b;hp=08fa2326c327f0ceaeff7c40525268633efd796c;hpb=fa2afd74506815d24940f93f47d748c016fc3224;p=civicrm-core.git diff --git a/api/v3/CustomValue.php b/api/v3/CustomValue.php index 08fa2326c3..f7ef22ff9a 100644 --- a/api/v3/CustomValue.php +++ b/api/v3/CustomValue.php @@ -26,13 +26,9 @@ */ /** - * File for the CiviCRM APIv3 custom value functions + * This api exposes CiviCRM custom value. * * @package CiviCRM_APIv3 - * @subpackage API_CustomField - * - * @copyright CiviCRM LLC (c) 2004-2014 - * @version $Id: CustomField.php 30879 2010-11-22 15:45:55Z shot $ */ @@ -42,7 +38,8 @@ * @param array $params * Expected keys are in format custom_fieldID:recordID or custom_groupName:fieldName:recordID. * - * @example + * @example: + * @code * // entity ID. You do not need to specify entity type, we figure it out based on the fields you're using * 'entity_id' => 123, * // (omitting :id) inserts or updates a field in a single-valued group @@ -56,16 +53,14 @@ * // inserts another new record in multi-valued group * 'custom_33:-2' => value, * // you can use group_name:field_name instead of ID - * 'custom_some_group:my_field => 'myinfo', + * 'custom_some_group:my_field' => 'myinfo', * // updates record ID 8 in my_other_field in multi-valued some_big_group - * 'custom_some_big_group:my_other_field:8 => 'myinfo', - * + * 'custom_some_big_group:my_other_field:8' => 'myinfo', + * @endcode * * @throws Exception * @return array * ['values' => TRUE] or ['is_error' => 1, 'error_message' => 'what went wrong'] - * - * @access public */ function civicrm_api3_custom_value_create($params) { // @todo it's not clear where the entity_table is used as CRM_Core_BAO_CustomValueTable::setValues($create) @@ -111,11 +106,12 @@ function civicrm_api3_custom_value_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_custom_value_create_spec(&$params) { $params['entity_id']['api.required'] = 1; @@ -136,9 +132,6 @@ function _civicrm_api3_custom_value_create_spec(&$params) { * * @throws API_Exception * @return array - * - * - * @access public */ function civicrm_api3_custom_value_get($params) { @@ -229,11 +222,12 @@ function civicrm_api3_custom_value_get($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_custom_value_get_spec(&$params) { $params['entity_id']['api.required'] = 1;