CustomValue.php
This api exposes CiviCRM custom value.
Table of Contents
Functions
- civicrm_api3_custom_value_create() : array<string|int, mixed>
- Sets custom values for an entity.
- _civicrm_api3_custom_value_create_spec() : mixed
- Adjust Metadata for Create action.
- civicrm_api3_custom_value_get() : array<string|int, mixed>
- Use this API to get existing custom values for an entity.
- _civicrm_api3_custom_value_get_spec() : mixed
- Adjust Metadata for Get action.
- _civicrm_api3_custom_value_gettree_spec() : mixed
- CustomValue.gettree API specification
- civicrm_api3_custom_value_gettree() : array<string|int, mixed>
- CustomValue.gettree API
- _civicrm_api3_custom_value_getdisplayvalue_spec() : mixed
- CustomValue.getdisplayvalue API specification
- civicrm_api3_custom_value_getdisplayvalue() : array<string|int, mixed>
- CustomValue.getdisplayvalue API
Functions
civicrm_api3_custom_value_create()
Sets custom values for an entity.
civicrm_api3_custom_value_create(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
Expected keys are in format custom_fieldID:recordID or custom_groupName:fieldName:recordID.
Tags
Return values
array<string|int, mixed> —['values' => TRUE] or ['is_error' => 1, 'error_message' => 'what went wrong']
_civicrm_api3_custom_value_create_spec()
Adjust Metadata for Create action.
_civicrm_api3_custom_value_create_spec(array<string|int, mixed> &$params) : mixed
The metadata is used for setting defaults, documentation & validation.
Parameters
- $params : array<string|int, mixed>
-
Array of parameters determined by getfields.
civicrm_api3_custom_value_get()
Use this API to get existing custom values for an entity.
civicrm_api3_custom_value_get(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
Array specifying the entity_id. Optionally include entity_type param, i.e. 'entity_type' => 'Activity' If no entity_type is supplied, it will be determined based on the fields you request. If no entity_type is supplied and no fields are specified, 'Contact' will be assumed. Optionally include the desired custom data to be fetched (or else all custom data for this entity will be returned) Example: 'entity_id' => 123, 'return.custom_6' => 1, 'return.custom_33' => 1 If you do not know the ID, you may use group name : field name, for example 'return.foo_stuff:my_field' => 1
Tags
Return values
array<string|int, mixed>_civicrm_api3_custom_value_get_spec()
Adjust Metadata for Get action.
_civicrm_api3_custom_value_get_spec(array<string|int, mixed> &$params) : mixed
The metadata is used for setting defaults, documentation & validation.
Parameters
- $params : array<string|int, mixed>
-
Array of parameters determined by getfields.
_civicrm_api3_custom_value_gettree_spec()
CustomValue.gettree API specification
_civicrm_api3_custom_value_gettree_spec(array<string|int, mixed> &$spec) : mixed
Parameters
- $spec : array<string|int, mixed>
-
description of fields supported by this API call
Tags
civicrm_api3_custom_value_gettree()
CustomValue.gettree API
civicrm_api3_custom_value_gettree(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —API result
_civicrm_api3_custom_value_getdisplayvalue_spec()
CustomValue.getdisplayvalue API specification
_civicrm_api3_custom_value_getdisplayvalue_spec(array<string|int, mixed> &$spec) : mixed
Parameters
- $spec : array<string|int, mixed>
-
description of fields supported by this API call
civicrm_api3_custom_value_getdisplayvalue()
CustomValue.getdisplayvalue API
civicrm_api3_custom_value_getdisplayvalue(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —API result