translate event values to Twingle format

This commit is contained in:
Marc Michalsky forumZFD 2020-12-15 16:09:32 +01:00
parent 700b33f1b9
commit 96ce4f4b38
Signed by untrusted user who does not match committer: marc.koch
GPG key ID: 12406554CFB028B9

View file

@ -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');
}