translate event values to Twingle format
This commit is contained in:
parent
700b33f1b9
commit
96ce4f4b38
1 changed files with 8 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
use CRM_TwingleCampaign_ExtensionUtil as E;
|
||||
use CRM_TwingleCampaign_Utils_ExtensionCache as Cache;
|
||||
use CRM_TwingleCampaign_BAO_TwingleEvent as TwingleEvent;
|
||||
|
||||
/**
|
||||
* TwingleEvent.Get API specification (optional)
|
||||
|
@ -148,9 +149,15 @@ function civicrm_api3_twingle_event_Get($params) {
|
|||
unset($returnValues[$event['id']]['twingle_event_id']);
|
||||
}
|
||||
}
|
||||
try {
|
||||
TwingleEvent::translateKeys($returnValues[$event['id']], TwingleEvent::OUT);
|
||||
TwingleEvent::formatValues($returnValues[$event['id']], TwingleEvent::OUT);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
throw new API_Exception($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return civicrm_api3_create_success($returnValues, $params, 'TwingleProject', 'Get');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue