translate project values in Twingle format
This commit is contained in:
parent
16ac86bc10
commit
f10b920465
1 changed files with 9 additions and 1 deletions
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
|
||||
use CRM_TwingleCampaign_ExtensionUtil as E;
|
||||
use CRM_TwingleCampaign_BAO_TwingleProject as TwingleProject;
|
||||
use CRM_TwingleCampaign_Utils_ExtensionCache as Cache;
|
||||
use CRM_TwingleCampaign_BAO_TwingleProject as TwingleProject;
|
||||
|
||||
/**
|
||||
* TwingleProject.Get API specification (optional)
|
||||
|
@ -110,6 +110,7 @@ function _civicrm_api3_twingle_project_Get_spec(array &$spec) {
|
|||
* API result descriptor
|
||||
*
|
||||
* @throws \CiviCRM_API3_Exception|\CiviCRM_API3_Exception
|
||||
* @throws \API_Exception
|
||||
* @see civicrm_api3_create_success
|
||||
*
|
||||
*/
|
||||
|
@ -158,6 +159,13 @@ function civicrm_api3_twingle_project_Get($params) {
|
|||
unset($returnValues[$project['id']]['twingle_project_id']);
|
||||
}
|
||||
}
|
||||
try {
|
||||
TwingleProject::translateKeys($returnValues[$project['id']], TwingleProject::OUT);
|
||||
TwingleProject::formatValues($returnValues[$project['id']], TwingleProject::OUT);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
throw new API_Exception($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue