* @param array $params array or parameters determined by getfields
*/
function _civicrm_api3_message_template_send_spec(&$params) {
- $required = array(
- 'messageTemplateID',
- 'contactId',
- 'toEmail',
- 'toName',
- );
- foreach ($required as $value) {
- $params[$value]['api.required'] = 1;
- }
+ $params['messageTemplateID']['api.required'] = 1;
+ $params['messageTemplateID']['title'] = 'Message Template ID';
+ $params['contactId']['api.required'] = 1;
+ $params['contactId']['title'] = 'Contact ID';
+ $params['toEmail']['api.required'] = 1;
+ $params['toEmail']['title'] = 'To Email';
+ $params['toName']['api.required'] = 1;
+ $params['toName']['title'] = 'To Name';
}
}
$actions = $this->callAPISuccess($entity, 'getactions', array());
foreach ($actions['values'] as $action) {
+ if (substr($action, -7) == '_create' || substr($action, -4) == '_get' || substr($action, -7) == '_delete') {
+ //getactions can't distinguish between contribution_page.create & contribution_page.create
+ continue;
+ }
$fields = $this->callAPISuccess($entity, 'getfields', array('action' => $action));
if (!empty($ids) && in_array($action, array('create', 'get'))) {
- $this->assertArrayHasKey('custom_' . $ids['custom_field_id'], $fields['values']);
+ $this->assertArrayHasKey('custom_' . $ids['custom_field_id'], $fields['values']);
}
foreach ($fields['values'] as $fieldName => $fieldSpec) {