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
|
<?php
|
||||||
use CRM_TwingleCampaign_ExtensionUtil as E;
|
use CRM_TwingleCampaign_ExtensionUtil as E;
|
||||||
use CRM_TwingleCampaign_Utils_ExtensionCache as Cache;
|
use CRM_TwingleCampaign_Utils_ExtensionCache as Cache;
|
||||||
|
use CRM_TwingleCampaign_BAO_TwingleEvent as TwingleEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TwingleEvent.Get API specification (optional)
|
* TwingleEvent.Get API specification (optional)
|
||||||
|
@ -148,8 +149,14 @@ function civicrm_api3_twingle_event_Get($params) {
|
||||||
unset($returnValues[$event['id']]['twingle_event_id']);
|
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');
|
return civicrm_api3_create_success($returnValues, $params, 'TwingleProject', 'Get');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue