* Array of parameters determined by getfields.
*/
function _civicrm_api3_activity_type_create_spec(&$params) {
- $params['label']['api.required'] = 1;
- $params['label']['title'] = 'Label';
- $params['weight']['api.required'] = 1;
- $params['weight']['title'] = 'Weight';
+ $params['label'] = array(
+ 'api.required' => 1,
+ 'title' => 'Label',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['weight'] = array(
+ 'api.required' => 1,
+ 'title' => 'Weight',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
}
/**
$params['street_parsing'] = array(
'title' => 'Street Address Parsing',
'description' => 'Optional param to indicate you want the street_address field parsed into individual params',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
);
$params['world_region'] = array(
'title' => ts('World Region'),
* Parameters determined by getfields.
*/
function _civicrm_api3_case_get_spec(&$params) {
- $params['contact_id']['api.aliases'] = array('client_id');
- $params['contact_id']['title'] = 'Case Client';
+ $params['contact_id'] = array(
+ 'api.aliases' => array('client_id'),
+ 'title' => 'Case Client',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
}
/**
* Array of parameters determined by getfields.
*/
function _civicrm_api3_case_create_spec(&$params) {
- $params['contact_id']['api.aliases'] = array('client_id');
- $params['contact_id']['title'] = 'Case Client';
- $params['contact_id']['api.required'] = 1;
+ $params['contact_id'] = array(
+ 'api.aliases' => array('client_id'),
+ 'title' => 'Case Client',
+ 'api.required' => 1,
+ 'type' => CRM_Utils_Type::T_INT,
+ );
$params['status_id']['api.default'] = 1;
$params['status_id']['api.aliases'] = array('case_status');
$params['creator_id']['api.default'] = 'user_contact_id';
$params['medium_id'] = array(
'name' => 'medium_id',
'title' => 'Activity Medium',
+ 'type' => CRM_Utils_Type::T_INT,
);
}
'name' => 'name',
'api.required' => 1,
'options' => array_combine($options, $options),
+ 'type' => CRM_Utils_Type::T_STRING,
),
);
}
$params['dupe_check'] = array(
'title' => 'Check for Duplicates',
'description' => 'Throw error if contact create matches dedupe rule',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
);
$params['prefix_id']['api.aliases'] = array('individual_prefix', 'individual_prefix_id');
$params['suffix_id']['api.aliases'] = array('individual_suffix', 'individual_suffix_id');
// We declare all these pseudoFields as there are other undocumented fields accessible
// via the api - but if check permissions is set we only allow declared fields
- $params['address_id']['title'] = 'Primary Address ID';
- $params['street_address']['title'] = 'Primary Address Street Address';
- $params['supplemental_address_1']['title'] = 'Primary Address Supplemental Address 1';
- $params['supplemental_address_2']['title'] = 'Primary Address Supplemental Address 2';
- $params['current_employer']['title'] = 'Current Employer';
- $params['city']['title'] = 'Primary Address City';
- $params['postal_code_suffix']['title'] = 'Primary Address Post Code Suffix';
- $params['postal_code']['title'] = 'Primary Address Post Code';
- $params['geo_code_1']['title'] = 'Primary Address Latitude';
- $params['geo_code_2']['title'] = 'Primary Address Longitude';
- $params['state_province_id']['title'] = 'Primary Address State Province ID';
- $params['state_province_name']['title'] = 'Primary Address State Province Name';
- $params['state_province']['title'] = 'Primary Address State Province';
- $params['country_id']['title'] = 'Primary Address Country ID';
- $params['country']['title'] = 'Primary Address country';
- $params['worldregion_id']['title'] = 'Primary Address World Region ID';
- $params['worldregion']['title'] = 'Primary Address World Region';
- $params['phone_id']['title'] = 'Primary Phone ID';
- $params['phone']['title'] = 'Primary Phone';
- $params['phone_type_id']['title'] = 'Primary Phone Type ID';
- $params['provider_id']['title'] = 'Primary Phone Provider ID';
- $params['email_id']['title'] = 'Primary Email ID';
- $params['email']['title'] = 'Primary Email';
- $params['gender_id']['title'] = 'Gender ID';
- $params['gender']['title'] = 'Gender';
- $params['on_hold']['title'] = 'Primary Email On Hold';
- $params['im']['title'] = 'Primary Instant Messenger';
- $params['im_id']['title'] = 'Primary Instant Messenger ID';
- $params['group_id']['title'] = 'Group Memberships (filter)';
- $params['group']['title'] = 'Group Memberships (filter, array)';
- $params['tag']['title'] = 'Assigned tags (filter, array)';
+ $params['address_id'] = array(
+ 'title' => 'Primary Address ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['street_address'] = array(
+ 'title' => 'Primary Address Street Address',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['supplemental_address_1'] = array(
+ 'title' => 'Primary Address Supplemental Address 1',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['supplemental_address_2'] = array(
+ 'title' => 'Primary Address Supplemental Address 2',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['current_employer'] = array(
+ 'title' => 'Current Employer',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['city'] = array(
+ 'title' => 'Primary Address City',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['postal_code_suffix'] = array(
+ 'title' => 'Primary Address Post Code Suffix',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['postal_code'] = array(
+ 'title' => 'Primary Address Post Code',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['geo_code_1'] = array(
+ 'title' => 'Primary Address Latitude',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['geo_code_2'] = array(
+ 'title' => 'Primary Address Longitude',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['state_province_id'] = array(
+ 'title' => 'Primary Address State Province ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['state_province_name'] = array(
+ 'title' => 'Primary Address State Province Name',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['state_province'] = array(
+ 'title' => 'Primary Address State Province',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['country_id'] = array(
+ 'title' => 'Primary Address Country ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['country'] = array(
+ 'title' => 'Primary Address country',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['worldregion_id'] = array(
+ 'title' => 'Primary Address World Region ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['worldregion'] = array(
+ 'title' => 'Primary Address World Region',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['phone_id'] = array(
+ 'title' => 'Primary Phone ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['phone'] = array(
+ 'title' => 'Primary Phone',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['phone_type_id'] = array(
+ 'title' => 'Primary Phone Type ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['provider_id'] = array(
+ 'title' => 'Primary Phone Provider ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['email_id'] = array(
+ 'title' => 'Primary Email ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['email'] = array(
+ 'title' => 'Primary Email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['gender_id'] = array(
+ 'title' => 'Gender ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['gender'] = array(
+ 'title' => 'Gender',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['on_hold'] = array(
+ 'title' => 'Primary Email On Hold',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
+ $params['im'] = array(
+ 'title' => 'Primary Instant Messenger',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['im_id'] = array(
+ 'title' => 'Primary Instant Messenger ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['group_id'] = array(
+ 'title' => 'Group Memberships (filter)',
+ );
+ $params['group'] = array(
+ 'title' => 'Group Memberships (filter, array)',
+ );
+ $params['tag'] = array(
+ 'title' => 'Assigned tags (filter, array)',
+ );
$params['birth_date_low'] = array('name' => 'birth_date_low', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Birth Date is equal to or greater than'));
$params['birth_date_high'] = array('name' => 'birth_date_high', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Birth Date is equal to or less than'));
$params['deceased_date_low'] = array('name' => 'deceased_date_low', 'type' => CRM_Utils_Type::T_DATE, 'title' => ts('Deceased Date is equal to or greater than'));
* @param array $params
*/
function _civicrm_api3_contact_proximity_spec(&$params) {
- $params['latitude']['api.required'] = 1;
- $params['latitude']['title'] = 'Latitude';
- $params['longitude']['api.required'] = 1;
- $params['longitude']['title'] = 'Longitude';
- $params['unit']['api.default'] = 'meter';
- $params['unit']['title'] = 'Unit of Measurement';
+ $params['latitude'] = array(
+ 'title' => 'Latitude',
+ 'api.required' => 1,
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['longitude'] = array(
+ 'title' => 'Longitude',
+ 'api.required' => 1,
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+
+ $params['unit'] = array(
+ 'title' => 'Unit of Measurement',
+ 'api.default' => 'meter',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
}
/**
// field is called payment processor - not payment processor id but can only be one id so
// it seems likely someone will fix it up one day to be more consistent - lets alias it from the start
'api.aliases' => array('payment_processor_id'),
+ 'type' => CRM_Utils_Type::T_INT,
);
$params['financial_type_id']['api.aliases'] = array('contribution_type_id', 'contribution_type');
$params['financial_type_id']['api.required'] = 1;
* Array of parameters determined by getfields.
*/
function _civicrm_api3_contribution_get_spec(&$params) {
- $params['contribution_test']['api.default'] = 0;
- $params['contribution_test']['title'] = 'Get Test Contributions?';
+ $params['contribution_test'] = array(
+ 'api.default' => 0,
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ 'title' => 'Get Test Contributions?',
+ );
$params['financial_type_id']['api.aliases'] = array('contribution_type_id');
$params['contact_id'] = $params['contribution_contact_id'];
$params['contact_id']['api.aliases'] = array('contribution_contact_id');
$params['id'] = array(
'api.required' => 1,
'title' => 'Contribution ID',
+ 'type' => CRM_Utils_Type::T_INT,
);
$params['receipt_from_email'] = array(
'api.required' => 1,
'title' => 'From Email address (string) required until someone provides a patch :-)',
+ 'type' => CRM_Utils_Type::T_STRING,
);
$params['receipt_from_name'] = array(
'title' => 'From Name (string)',
+ 'type' => CRM_Utils_Type::T_STRING,
);
$params['cc_receipt'] = array(
'title' => 'CC Email address (string)',
+ 'type' => CRM_Utils_Type::T_STRING,
);
$params['bcc_receipt'] = array(
'title' => 'BCC Email address (string)',
+ 'type' => CRM_Utils_Type::T_STRING,
);
$params['receipt_text'] = array(
'title' => 'Message (string)',
+ 'type' => CRM_Utils_Type::T_STRING,
);
}
* @param array $params
*/
function _civicrm_api3_job_geocode_spec(&$params) {
- $params['start'] = array('title' => 'Start Date');
- $params['end'] = array('title' => 'End Date');
- $params['geocoding'] = array('title' => 'Geocode address?');
- $params['parse'] = array('title' => 'Parse street address?');
+ $params['start'] = array(
+ 'title' => 'Start Date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ );
+ $params['end'] = array(
+ 'title' => 'End Date',
+ 'type' => CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME,
+ );
+ $params['geocoding'] = array(
+ 'title' => 'Geocode address?',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
+ $params['parse'] = array(
+ 'title' => 'Parse street address?',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
$params['throttle'] = array(
'title' => 'Throttle?',
- 'description' => 'if enabled, geo-codes at a slow rate',
+ 'description' => 'If enabled, geo-codes at a slow rate',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
);
}
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_a_b_graph_stats_spec(&$params) {
- $params['criteria']['title'] = 'Criteria';
- $params['criteria']['default'] = 'Open';
+ $params['criteria'] = array(
+ 'title' => 'Criteria',
+ 'default' => 'Open',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+
// mailing_ab_winner_criteria
$params['target_date']['title'] = 'Target Date';
$params['target_date']['type'] = CRM_Utils_Type::T_DATE + CRM_Utils_Type::T_TIME;
- $params['split_count']['title'] = 'Split Count';
- $params['split_count']['api.default'] = 6;
+ $params['split_count'] = array(
+ 'title' => 'Split Count',
+ 'api.default' => 6,
+ 'type' => CRM_Utils_Type::T_INT,
+ );
$params['split_count_select']['title'] = 'Split Count Select';
$params['split_count_select']['api.required'] = 1;
$params['target_url']['title'] = 'Target URL';
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_contact_get_spec(&$params) {
- $params['contact_id']['api.required'] = 1;
- $params['contact_id']['title'] = 'Contact ID';
+ $params['contact_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Contact ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+
$params['type'] = array(
'api.default' => 'Delivered',
'title' => 'Type', // doesn't really explain the field - but not sure I understand it to explain it better
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_confirm_create_spec(&$params) {
- $params['contact_id']['api.required'] = 1;
- $params['contact_id']['title'] = 'Contact ID';
- $params['subscribe_id']['api.required'] = 1;
- $params['subscribe_id']['title'] = 'Subscribe Event ID';
- $params['hash']['api.required'] = 1;
- $params['hash']['title'] = 'Hash';
+ $params['contact_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Contact ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['subscribe_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Subscribe Event ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['hash'] = array(
+ 'api.required' => 1,
+ 'title' => 'Hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
}
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_queue_create_spec(&$params) {
- $params['job_id']['api.required'] = 1;
+ $params['job_id'] = array(
+ 'api.required' => 1,
+ 'type' => CRM_Utils_Type::T_INT,
+ 'title' => 'Job ID',
+ );
$params['contact_id']['api.required'] = 1;
}
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_resubscribe_create_spec(&$params) {
- $params['event_queue_id']['api.required'] = 1;
- $params['event_queue_id']['title'] = 'Event Queue ID';
- $params['job_id']['api.required'] = 1;
- $params['job_id']['title'] = 'Job ID';
- $params['hash']['api.required'] = 1;
- $params['hash']['title'] = 'Hash';
+ $params['event_queue_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Event Queue ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['job_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Job ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['hash'] = array(
+ 'api.required' => 1,
+ 'title' => 'Hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
}
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_subscribe_create_spec(&$params) {
- $params['email']['api.required'] = 1;
- $params['email']['title'] = 'Unsubscribe Email';
- $params['group_id']['api.required'] = 1;
- $params['group_id']['title'] = 'Unsubscribe From Group';
+ $params['email'] = array(
+ 'api.required' => 1,
+ 'title' => 'Unsubscribe Email',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['group_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Unsubscribe From Group',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
}
* Array of parameters determined by getfields.
*/
function _civicrm_api3_mailing_event_unsubscribe_create_spec(&$params) {
- $params['job_id']['api.required'] = 1;
- $params['job_id']['title'] = 'Mailing Job ID';
- $params['hash']['api.required'] = 1;
- $params['hash']['title'] = 'Mailing Hash';
- $params['event_queue_id']['api.required'] = 1;
- $params['event_queue_id']['title'] = 'Mailing Queue ID';
+ $params['job_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Mailing Job ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+ $params['hash'] = array(
+ 'api.required' => 1,
+ 'title' => 'Mailing Hash',
+ 'type' => CRM_Utils_Type::T_STRING,
+ );
+ $params['event_queue_id'] = array(
+ 'api.required' => 1,
+ 'title' => 'Mailing Queue ID',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
}
$params['skipStatusCal'] = array(
'title' => 'Skip status calculation',
'description' => 'By default this is 0 if id is not set and 1 if it is set.',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
);
$params['num_terms'] = array(
'title' => 'Number of terms',
$params['id']['description'] = 'ID of the template';
$params['id']['title'] = 'Message Template ID';
$params['id']['api.aliases'] = array('messageTemplateID', 'message_template_id');
+ $params['id']['type'] = CRM_Utils_Type::T_INT;
$params['option_group_name']['description'] = 'option group name of the template (required if no id supplied)';
$params['option_group_name']['title'] = 'Option Group Name';
$params['option_group_name']['api.aliases'] = array('groupName');
+ $params['option_group_name']['type'] = CRM_Utils_Type::T_STRING;
$params['option_value_name']['description'] = 'option value name of the template (required if no id supplied)';
$params['option_value_name']['title'] = 'Option Value Name';
$params['option_value_name']['api.aliases'] = array('valueName');
+ $params['option_value_name']['type'] = CRM_Utils_Type::T_STRING;
$params['contact_id']['description'] = 'contact id if contact tokens are to be replaced';
$params['contact_id']['title'] = 'Contact ID';
$params['contact_id']['api.aliases'] = array('contactId');
+ $params['contact_id']['type'] = CRM_Utils_Type::T_INT;
$params['template_params']['description'] = 'additional template params (other than the ones already set in the template singleton)';
$params['template_params']['title'] = 'Template Params';
$params['template_params']['api.aliases'] = array('tplParams');
+ // FIXME: Type??
$params['from']['description'] = 'the From: header';
$params['from']['title'] = 'From';
+ $params['from']['type'] = CRM_Utils_Type::T_STRING;
$params['to_name']['description'] = 'the recipient’s name';
$params['to_name']['title'] = 'Recipient Name';
$params['to_name']['api.aliases'] = array('toName');
+ $params['to_name']['type'] = CRM_Utils_Type::T_STRING;
$params['to_email']['description'] = 'the recipient’s email - mail is sent only if set';
$params['to_email']['title'] = 'Recipient Email';
$params['to_email']['api.aliases'] = array('toEmail');
+ $params['to_email']['type'] = CRM_Utils_Type::T_STRING;
$params['cc']['description'] = 'the Cc: header';
$params['cc']['title'] = 'CC';
+ $params['cc']['type'] = CRM_Utils_Type::T_STRING;
$params['bcc']['description'] = 'the Bcc: header';
$params['bcc']['title'] = 'BCC';
+ $params['bcc']['type'] = CRM_Utils_Type::T_STRING;
$params['reply_to']['description'] = 'the Reply-To: header';
$params['reply_to']['title'] = 'Reply To';
$params['reply_to']['api.aliases'] = array('replyTo');
+ $params['reply_to']['type'] = CRM_Utils_Type::T_STRING;
$params['attachments']['description'] = 'email attachments';
$params['attachments']['title'] = 'Attachments';
+ // FIXME: Type??
$params['is_test']['description'] = 'whether this is a test email (and hence should include the test banner)';
$params['is_test']['title'] = 'Is Test';
$params['is_test']['api.aliases'] = array('isTest');
+ $params['is_test']['type'] = CRM_Utils_Type::T_BOOLEAN;
$params['pdf_filename']['description'] = 'filename of optional PDF version to add as attachment (do not include path)';
$params['pdf_filename']['title'] = 'PDF Filename';
$params['pdf_filename']['api.aliases'] = array('PDFFilename');
+ $params['pdf_filename']['type'] = CRM_Utils_Type::T_STRING;
}
* Array of parameters determined by getfields.
*/
function _civicrm_api3_participant_get_spec(&$params) {
- $params['participant_test']['api.default'] = 0;
- $params['participant_test']['title'] = 'Get Test Participants';
+ $params['participant_test'] = array(
+ 'api.default' => 0,
+ 'title' => 'Get Test Participants',
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ );
}
/**
'type' => CRM_Utils_Type::T_BOOLEAN,
'api.default' => TRUE,
);
- $params['created_id']['api.default'] = 'user_contact_id';
- $params['created_id']['title'] = 'Created By';
+ $params['created_id'] = array(
+ 'api.default' => 'user_contact_id',
+ 'title' => 'Created By',
+ 'type' => CRM_Utils_Type::T_INT,
+ );
+
$params['is_active']['api.default'] = TRUE;
}