X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FCustomValue.php;h=2deb17d7b15975b7a16cbaa80ed15e25eda01b67;hb=63f63f5a548ec1293e4daf26fd84349f72e2e6c4;hp=748bbde23b97ba2c765ed20dceb306e5aa10dd52;hpb=e80a4b8f0d2023c626f0697b48223a673d8f0bb5;p=civicrm-core.git diff --git a/api/v3/CustomValue.php b/api/v3/CustomValue.php index 748bbde23b..2deb17d7b1 100644 --- a/api/v3/CustomValue.php +++ b/api/v3/CustomValue.php @@ -1,9 +1,9 @@ 123, * // (omitting :id) inserts or updates a field in a single-valued group @@ -56,10 +53,10 @@ * // 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 @@ -105,7 +102,7 @@ function civicrm_api3_custom_value_create($params) { if ($result['is_error']) { throw new Exception($result['error_message']); } - return civicrm_api3_create_success(TRUE, $params); + return civicrm_api3_create_success(TRUE, $params, 'CustomValue'); } /** @@ -114,7 +111,7 @@ function civicrm_api3_custom_value_create($params) { * 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; @@ -172,7 +169,7 @@ function civicrm_api3_custom_value_get($params) { if ($result['is_error']) { if ($result['error_message'] == "No values found for the specified entity ID and custom field(s).") { $values = array(); - return civicrm_api3_create_success($values, $params); + return civicrm_api3_create_success($values, $params, 'CustomValue'); } else { throw new API_Exception($result['error_message']); @@ -220,7 +217,7 @@ function civicrm_api3_custom_value_get($params) { $values[$id]['id'] = $id; $values[$id][$n] = $value; } - return civicrm_api3_create_success($values, $params); + return civicrm_api3_create_success($values, $params, 'CustomValue'); } } @@ -230,7 +227,7 @@ function civicrm_api3_custom_value_get($params) { * 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;