give back associative array with results sorted by their id's
This commit is contained in:
parent
23d11fcfd2
commit
8404c4e946
1 changed files with 2 additions and 4 deletions
|
@ -75,8 +75,7 @@ function civicrm_api3_twingle_form_Get(array $params): array {
|
||||||
|
|
||||||
if ($result['is_error'] == 0) {
|
if ($result['is_error'] == 0) {
|
||||||
foreach($result['values'] as $value) {
|
foreach($result['values'] as $value) {
|
||||||
array_push(
|
$returnValues[$value['id']] =
|
||||||
$returnValues,
|
|
||||||
[
|
[
|
||||||
'id' => $value['id'],
|
'id' => $value['id'],
|
||||||
'twingle_project_id' => $value[$custom_field_mapping['twingle_project_id']],
|
'twingle_project_id' => $value[$custom_field_mapping['twingle_project_id']],
|
||||||
|
@ -85,8 +84,7 @@ function civicrm_api3_twingle_form_Get(array $params): array {
|
||||||
'project_type' => $value[$custom_field_mapping['twingle_project_type']],
|
'project_type' => $value[$custom_field_mapping['twingle_project_type']],
|
||||||
'embed_code' => $value[$custom_field_mapping['twingle_project_widget']],
|
'embed_code' => $value[$custom_field_mapping['twingle_project_widget']],
|
||||||
'counter' => $value[$custom_field_mapping['twingle_project_counter']]
|
'counter' => $value[$custom_field_mapping['twingle_project_counter']]
|
||||||
]
|
];
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return civicrm_api3_create_success($returnValues, $params, 'TwingleForm', 'Get');
|
return civicrm_api3_create_success($returnValues, $params, 'TwingleForm', 'Get');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue