function activity_create_example(){
$params = array(
'source_contact_id' => 1,
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'activity_date_time' => '2011-06-02 14:36:13',
'status_id' => 2,
'1' => array(
'id' => '1',
'source_record_id' => '',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'activity_date_time' => '20110602143613',
'duration' => '120',
'values' => array(
'1' => array(
'id' => '1',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'activity_date_time' => '2011-06-02 14:36:13',
'duration' => '120',
'source_contact_id' => '1',
'custom_1' => 'defaultValue',
'custom_1_1' => 'defaultValue',
- 'custom_2_id' => '1',
- 'custom_2_1_id' => '1',
'custom_2' => 'Anderson, Anthony',
'custom_2_1' => 'Anderson, Anthony',
+ 'custom_2_1_id' => '1',
+ 'custom_2_id' => '1',
),
),
);
function activity_create_example(){
$params = array(
'source_contact_id' => 1,
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'activity_date_time' => '2011-06-02 14:36:13',
'status_id' => 2,
'1' => array(
'id' => '1',
'source_record_id' => '',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'activity_date_time' => '20110602143613',
'duration' => '120',
'values' => array(
'0' => array(
'id' => '1',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'Make-it-Happen Meeting',
'activity_date_time' => '2011-01-01 00:00:00',
'duration' => '120',
'values' => array(
'0' => array(
'id' => '2',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'Make-it-Happen Meeting',
'activity_date_time' => '2012-02-16 00:00:00',
'duration' => '120',
--- /dev/null
+<?php
+/**
+ * Test Generated example of using activity delete API
+ * *
+ */
+function activity_delete_example(){
+$params = array(
+ 'id' => 1,
+);
+
+try{
+ $result = civicrm_api3('activity', 'delete', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function activity_delete_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testDeleteActivity and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
function activity_get_example(){
$params = array(
'contact_id' => 1,
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'sequential' => 1,
'return.custom_1' => 1,
);
'0' => array(
'source_contact_id' => '1',
'id' => '1',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'location' => 'Pensulvania',
'activity_date_time' => '2011-06-02 14:36:13',
'activity_type_id' => array(
'name' => 'activity_type_id',
'type' => 1,
- 'title' => 'Activity Type ID',
+ 'title' => 'Activity Type',
'required' => true,
'import' => true,
'where' => 'civicrm_activity.activity_type_id',
'headerPattern' => '/(activity.)?type(.id$)/i',
'default' => '1',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'activity_type',
),
'where' => 'civicrm_activity.activity_date_time',
'headerPattern' => '/(activity.)?date(.time$)?/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ),
),
'phone_id' => array(
'name' => 'phone_id',
'type' => 1,
'title' => 'Phone (called) ID',
'FKClassName' => 'CRM_Core_DAO_Phone',
+ 'html' => array(
+ 'type' => 'Autocomplete-Select',
+ ),
),
'phone_number' => array(
'name' => 'phone_number',
'title' => 'Phone (called) Number',
'maxlength' => 64,
'size' => 30,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'priority_id' => array(
'name' => 'priority_id',
'type' => 1,
'title' => 'Priority',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'priority',
),
'headerPattern' => '/(is.)?(current.)?(revision|version(ing)?)/i',
'export' => true,
'default' => '1',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'original_id' => array(
'name' => 'original_id',
'name' => 'weight',
'type' => 1,
'title' => 'Weight',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'id' => array(
'name' => 'id',
'where' => 'civicrm_activity.subject',
'headerPattern' => '/(activity.)?subject/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'uniqueName' => 'activity_subject',
),
'duration' => array(
'where' => 'civicrm_activity.duration',
'headerPattern' => '/(activity.)?duration(s)?$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'uniqueName' => 'activity_duration',
),
'location' => array(
'where' => 'civicrm_activity.location',
'headerPattern' => '/(activity.)?location$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'uniqueName' => 'activity_location',
),
'details' => array(
'where' => 'civicrm_activity.details',
'headerPattern' => '/(activity.)?detail(s)?$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'RichTextEditor',
+ ),
'uniqueName' => 'activity_details',
),
'status_id' => array(
'name' => 'status_id',
'type' => 1,
- 'title' => 'Activity Status Id',
+ 'title' => 'Activity Status',
'import' => true,
'where' => 'civicrm_activity.status_id',
'headerPattern' => '/(activity.)?status(.label$)?/i',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'activity_status',
),
'where' => 'civicrm_activity.is_test',
'headerPattern' => '/(is.)?test(.activity)?/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'uniqueName' => 'activity_is_test',
),
'medium_id' => array(
'type' => 1,
'title' => 'Activity Medium',
'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'encounter_medium',
),
'title' => 'Result',
'maxlength' => 255,
'size' => 45,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'uniqueName' => 'activity_result',
),
'is_deleted' => array(
'where' => 'civicrm_activity.is_deleted',
'headerPattern' => '/(activity.)?(trash|deleted)/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'uniqueName' => 'activity_is_deleted',
),
'campaign_id' => array(
'where' => 'civicrm_activity.campaign_id',
'export' => true,
'FKClassName' => 'CRM_Campaign_DAO_Campaign',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
'pseudoconstant' => array(
'table' => 'civicrm_campaign',
'keyColumn' => 'id',
'import' => true,
'where' => 'civicrm_activity.engagement_level',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'engagement_index',
),
'values' => array(
'0' => array(
'id' => '1',
- 'activity_type_id' => '46',
+ 'activity_type_id' => '49',
'subject' => 'test activity type id',
'activity_date_time' => '2011-06-02 14:36:13',
'duration' => '120',
'last_name' => 'Anderson',
'prefix_id' => '3',
'suffix_id' => '3',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => 'Mr.',
'individual_suffix' => 'II',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
--- /dev/null
+<?php
+/**
+ * Test Generated example of using activity_contact create API
+ * *
+ */
+function activity_contact_create_example(){
+$params = array(
+ 'contact_id' => 3,
+ 'activity_id' => 1,
+ 'record_type_id' => 2,
+);
+
+try{
+ $result = civicrm_api3('activity_contact', 'create', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function activity_contact_create_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 1,
+ 'values' => array(
+ '1' => array(
+ 'id' => '1',
+ 'activity_id' => '1',
+ 'contact_id' => '3',
+ 'record_type_id' => '2',
+ ),
+ ),
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testCreateActivityContact and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityContactTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example of using activity_contact delete API
+ * *
+ */
+function activity_contact_delete_example(){
+$params = array(
+ 'id' => 1,
+);
+
+try{
+ $result = civicrm_api3('activity_contact', 'delete', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function activity_contact_delete_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testDeleteActivityContact and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityContactTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 727,
+ 'id' => 764,
'values' => array(
- '727' => array(
- 'id' => '727',
+ '764' => array(
+ 'id' => '764',
'option_group_id' => '2',
'label' => 'send out letters',
- 'value' => '46',
+ 'value' => '49',
'name' => 'send out letters',
'grouping' => '',
'filter' => 0,
$expectedResult = array(
'is_error' => 0,
'version' => 3,
- 'count' => 45,
+ 'count' => 48,
'values' => array(
'1' => 'Meeting',
'2' => 'Phone Call',
'43' => 'Edit Batch',
'44' => 'SMS delivery',
'45' => 'Inbound SMS',
+ '46' => 'Payment',
+ '47' => 'Refund',
+ '48' => 'Change Registration',
),
);
$params = array(
'subject' => 'Test case',
'contact_id' => 17,
- 'case_type' => 'Housing Support',
+ 'case_type' => 'housing_support',
);
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 1,
+ 'id' => 2,
'values' => array(
- '1' => array(
- 'id' => '1',
- 'case_type_id' => '4',
+ '2' => array(
+ 'id' => '2',
+ 'case_type_id' => '1',
'subject' => 'Test case',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '',
'last_name' => 'xyz3',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'contribution_campaign_id' => '',
'financial_type_id' => '1',
'financial_type' => 'Donation',
- 'instrument_id' => '81',
+ 'instrument_id' => '84',
'payment_instrument' => 'Credit Card',
'product_id' => '',
'product_name' => '',
'last_name' => 'xyz3',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'last_name' => 'xyz3',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'last_name' => '',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'last_name' => 'xyz3',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'source' => 'SSF',
'amount_level' => '',
'contribution_recur_id' => '',
- 'honor_contact_id' => '',
'is_test' => '',
'is_pay_later' => '',
'contribution_status_id' => '1',
- 'honor_type_id' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
'last_name' => 'xyz3',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'source' => 'SSF',
'amount_level' => '',
'contribution_recur_id' => '',
- 'honor_contact_id' => '',
'is_test' => '',
'is_pay_later' => '',
'contribution_status_id' => '1',
- 'honor_type_id' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
'last_name' => 'xyz1',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'last_name' => '',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
$expectedResult = array(
'is_error' => 0,
'version' => 3,
- 'count' => 53,
+ 'count' => 55,
'values' => array(
'id' => array(
'name' => 'id',
'size' => 30,
'export' => true,
'where' => 'civicrm_contact.contact_type',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'table' => 'civicrm_contact_type',
'keyColumn' => 'name',
'where' => 'civicrm_contact.contact_sub_type',
'headerPattern' => '/C(ontact )?(subtype|sub-type|sub type)/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Multi-Select',
+ ),
'pseudoconstant' => array(
'table' => 'civicrm_contact_type',
'keyColumn' => 'name',
'headerPattern' => '/d(o )?(not )?(email)/i',
'dataPattern' => '/^\\d{1,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'do_not_phone' => array(
'name' => 'do_not_phone',
'headerPattern' => '/d(o )?(not )?(call|phone)/i',
'dataPattern' => '/^\\d{1,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'do_not_mail' => array(
'name' => 'do_not_mail',
'headerPattern' => '/^(d(o\\s)?n(ot\\s)?mail)|(\\w*)?bulk\\s?(\\w*)$/i',
'dataPattern' => '/^\\d{1,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'do_not_sms' => array(
'name' => 'do_not_sms',
'headerPattern' => '/d(o )?(not )?(sms)/i',
'dataPattern' => '/^\\d{1,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'do_not_trade' => array(
'name' => 'do_not_trade',
'headerPattern' => '/d(o )?(not )?(trade)/i',
'dataPattern' => '/^\\d{1,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'is_opt_out' => array(
'name' => 'is_opt_out',
'import' => true,
'where' => 'civicrm_contact.is_opt_out',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'legal_identifier' => array(
'name' => 'legal_identifier',
'headerPattern' => '/legal\\s?id/i',
'dataPattern' => '/\\w+?\\d{5,}/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'external_identifier' => array(
'name' => 'external_identifier',
'headerPattern' => '/external\\s?id/i',
'dataPattern' => '/^\\d{11,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'sort_name' => array(
'name' => 'sort_name',
'size' => 30,
'export' => true,
'where' => 'civicrm_contact.sort_name',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'display_name' => array(
'name' => 'display_name',
'size' => 30,
'export' => true,
'where' => 'civicrm_contact.display_name',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'nick_name' => array(
'name' => 'nick_name',
'headerPattern' => '/n(ick\\s)name|nick$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'legal_name' => array(
'name' => 'legal_name',
'where' => 'civicrm_contact.legal_name',
'headerPattern' => '/^legal|(l(egal\\s)?name)$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'image_URL' => array(
'name' => 'image_URL',
'import' => true,
'where' => 'civicrm_contact.image_URL',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'preferred_communication_method' => array(
'name' => 'preferred_communication_method',
'headerPattern' => '/^p(ref\\w*\\s)?c(omm\\w*)|( meth\\w*)$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'preferred_communication_method',
),
'where' => 'civicrm_contact.preferred_language',
'headerPattern' => '/^lang/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'languages',
'keyColumn' => 'name',
'name' => 'preferred_mail_format',
'type' => 2,
'title' => 'Preferred Mail Format',
+ 'maxlength' => 8,
+ 'size' => 8,
'import' => true,
'where' => 'civicrm_contact.preferred_mail_format',
'headerPattern' => '/^p(ref\\w*\\s)?m(ail\\s)?f(orm\\w*)$/i',
'export' => true,
'default' => 'Both',
- 'enumValues' => 'Text, HTML, Both',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::pmf',
+ ),
),
'hash' => array(
'name' => 'hash',
'headerPattern' => '/^first|(f(irst\\s)?name)$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'middle_name' => array(
'name' => 'middle_name',
'headerPattern' => '/^middle|(m(iddle\\s)?name)$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'last_name' => array(
'name' => 'last_name',
'headerPattern' => '/^last|(l(ast\\s)?name)$/i',
'dataPattern' => '/^\\w+(\\s\\w+)?+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'prefix_id' => array(
'name' => 'prefix_id',
'headerPattern' => '/^(prefix|title)/i',
'dataPattern' => '/^(mr|ms|mrs|sir|dr)\\.?$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'individual_prefix',
),
'headerPattern' => '/^suffix$/i',
'dataPattern' => '/^(sr|jr)\\.?|i{2,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'individual_suffix',
),
'1' => 'individual_suffix_id',
),
),
+ 'formal_title' => array(
+ 'name' => 'formal_title',
+ 'type' => 2,
+ 'title' => 'Formal Title',
+ 'maxlength' => 64,
+ 'size' => 30,
+ 'import' => true,
+ 'where' => 'civicrm_contact.formal_title',
+ 'headerPattern' => '/^title/i',
+ 'export' => true,
+ ),
+ 'communication_style_id' => array(
+ 'name' => 'communication_style_id',
+ 'type' => 1,
+ 'title' => 'Communication Style',
+ 'export' => true,
+ 'where' => 'civicrm_contact.communication_style_id',
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'communication_style',
+ ),
+ ),
'email_greeting_id' => array(
'name' => 'email_greeting_id',
'type' => 1,
'size' => 45,
'import' => true,
'where' => 'civicrm_contact.email_greeting_custom',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'email_greeting_display' => array(
'name' => 'email_greeting_display',
'title' => 'Email Greeting',
'maxlength' => 255,
'size' => 45,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'postal_greeting_id' => array(
'name' => 'postal_greeting_id',
'type' => 1,
'title' => 'Postal Greeting ID',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'postal_greeting_custom' => array(
'name' => 'postal_greeting_custom',
'size' => 45,
'import' => true,
'where' => 'civicrm_contact.postal_greeting_custom',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'postal_greeting_display' => array(
'name' => 'postal_greeting_display',
'title' => 'Postal Greeting',
'maxlength' => 255,
'size' => 45,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'addressee_id' => array(
'name' => 'addressee_id',
'size' => 45,
'import' => true,
'where' => 'civicrm_contact.addressee_custom',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'addressee_display' => array(
'name' => 'addressee_display',
'title' => 'Addressee',
'maxlength' => 255,
'size' => 45,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'job_title' => array(
'name' => 'job_title',
'headerPattern' => '/^job|(j(ob\\s)?title)$/i',
'dataPattern' => '//',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'gender_id' => array(
'name' => 'gender_id',
'where' => 'civicrm_contact.gender_id',
'headerPattern' => '/^gender$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'gender',
),
'headerPattern' => '/^birth|(b(irth\\s)?date)|D(\\W*)O(\\W*)B(\\W*)$/i',
'dataPattern' => '/\\d{4}-?\\d{2}-?\\d{2}/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ),
),
'is_deceased' => array(
'name' => 'is_deceased',
'where' => 'civicrm_contact.is_deceased',
'headerPattern' => '/i(s\\s)?d(eceased)$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
),
'deceased_date' => array(
'name' => 'deceased_date',
'where' => 'civicrm_contact.deceased_date',
'headerPattern' => '/^deceased|(d(eceased\\s)?date)$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Select Date',
+ ),
),
'household_name' => array(
'name' => 'household_name',
'headerPattern' => '/^household|(h(ousehold\\s)?name)$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'primary_contact_id' => array(
'name' => 'primary_contact_id',
'type' => 1,
'title' => 'Household Primary Contact ID',
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
),
'organization_name' => array(
'name' => 'organization_name',
'headerPattern' => '/^organization|(o(rganization\\s)?name)$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'sic_code' => array(
'name' => 'sic_code',
'where' => 'civicrm_contact.sic_code',
'headerPattern' => '/^sic|(s(ic\\s)?code)$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'user_unique_id' => array(
'name' => 'user_unique_id',
'dataPattern' => '/^[\\w\\/\\:\\.]+$/',
'export' => true,
'rule' => 'url',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'created_date' => array(
'name' => 'created_date',
'type' => 256,
'title' => 'Created Date',
'required' => '',
+ 'export' => true,
+ 'where' => 'civicrm_contact.created_date',
'default' => 'NULL',
),
'modified_date' => array(
'type' => 256,
'title' => 'Modified Date',
'required' => '',
+ 'export' => true,
+ 'where' => 'civicrm_contact.modified_date',
'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
),
'source' => array(
'where' => 'civicrm_contact.source',
'headerPattern' => '/(S(ource\\s)?o(f\\s)?C(ontact\\s)?Data)$/i',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'uniqueName' => 'contact_source',
),
'employer_id' => array(
'export' => true,
'where' => 'civicrm_contact.employer_id',
'FKClassName' => 'CRM_Contact_DAO_Contact',
+ 'html' => array(
+ 'type' => 'Autocomplete-Select',
+ ),
'uniqueName' => 'current_employer_id',
),
'is_deleted' => array(
'required' => true,
'export' => true,
'where' => 'civicrm_contact.is_deleted',
+ 'html' => array(
+ 'type' => 'CheckBox',
+ ),
'uniqueName' => 'contact_is_deleted',
),
'custom_1' => array(
'extends_entity_column_id' => '',
'is_view' => 0,
'is_multiple' => 0,
- 'option_group_id' => '99',
+ 'option_group_id' => '102',
'date_format' => '',
'time_format' => '',
+ 'is_required' => '1',
'name' => 'custom_1',
+ 'title' => 'Our special field',
'type' => 2,
'options' => array(
'1' => 'Label1',
'last_name' => 'Contact',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'last_name' => '',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'source' => 'SSF',
'amount_level' => '',
'contribution_recur_id' => '',
- 'honor_contact_id' => '',
'is_test' => '',
'is_pay_later' => '',
'contribution_status_id' => '1',
- 'honor_type_id' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
'net_amount' => '95',
'source' => 'SSF',
'contribution_status_id' => 1,
- 'soft_credit_to' => 2,
+ 'soft_credit' => array(
+ '1' => array(
+ 'contact_id' => 2,
+ 'amount' => 50,
+ 'soft_credit_type_id' => 3,
+ ),
+ ),
);
try{
'source' => 'SSF',
'amount_level' => '',
'contribution_recur_id' => '',
- 'honor_contact_id' => '',
'is_test' => '',
'is_pay_later' => '',
'contribution_status_id' => '1',
- 'honor_type_id' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
'source' => 'SSF',
'amount_level' => '',
'contribution_recur_id' => '',
- 'honor_contact_id' => '',
'is_test' => '',
'is_pay_later' => '',
'contribution_status_id' => '1',
- 'honor_type_id' => '',
'address_id' => '',
'check_number' => '',
'campaign_id' => '',
'id' => '1',
'entity_table' => 'civicrm_contribution',
'entity_id' => '1',
+ 'contribution_id' => '1',
'price_field_id' => '1',
'label' => 'line item',
'qty' => '2',
'id' => '2',
'entity_table' => 'civicrm_contribution',
'entity_id' => '1',
+ 'contribution_id' => '1',
'price_field_id' => '1',
'label' => 'line item',
'qty' => '1',
'contribution_campaign_id' => '',
'financial_type_id' => '1',
'financial_type' => 'Donation',
- 'instrument_id' => '84',
+ 'instrument_id' => '87',
'payment_instrument' => 'Check',
'product_id' => '',
'product_name' => '',
'financial_type_id' => 1,
'currency' => 'NZD',
'goal_amount' => 34567,
+ 'is_pay_later' => 1,
+ 'is_monetary' => true,
);
try{
'financial_type_id' => '1',
'payment_processor' => '',
'is_credit_card_only' => '',
- 'is_monetary' => '',
+ 'is_monetary' => '1',
'is_recur' => '',
'is_confirm_enabled' => '',
'recur_frequency_unit' => '',
'is_recur_interval' => '',
'is_recur_installments' => '',
- 'is_pay_later' => '',
+ 'is_pay_later' => '1',
'pay_later_text' => '',
'pay_later_receipt' => '',
'is_partial_payment' => '',
'cc_receipt' => '',
'bcc_receipt' => '',
'receipt_text' => '',
- 'is_active' => '',
+ 'is_active' => '1',
'footer_text' => '',
'amount_block_is_active' => '',
- 'honor_block_is_active' => '',
- 'honor_block_title' => '',
- 'honor_block_text' => '',
'start_date' => '',
'end_date' => '',
'created_id' => '',
*/
function contribution_page_delete_example(){
$params = array(
- 'id' => 4,
+ 'id' => 1,
);
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 3,
+ 'id' => 1,
'values' => array(
- '3' => array(
- 'id' => '3',
+ '1' => array(
+ 'id' => '1',
'title' => 'Test Contribution Page',
'financial_type_id' => '1',
'is_credit_card_only' => 0,
'is_confirm_enabled' => '1',
'is_recur_interval' => 0,
'is_recur_installments' => 0,
- 'is_pay_later' => 0,
+ 'is_pay_later' => '1',
'is_partial_payment' => 0,
'is_allow_other_amount' => 0,
'goal_amount' => '34567.00',
'is_for_organization' => 0,
'is_email_receipt' => 0,
+ 'is_active' => '1',
'amount_block_is_active' => '1',
'currency' => 'NZD',
'is_share' => '1',
--- /dev/null
+<?php
+/**
+ * Test Generated example of using contribution_page Submit API
+ * submit contribution page *
+ */
+function contribution_page_submit_example(){
+$params = array(
+ 'price_3' => '',
+ 'id' => 1,
+ 'amount' => 10,
+ 'billing_first_name' => 'Billy',
+ 'billing_middle_name' => 'Goat',
+ 'billing_last_name' => 'Gruff',
+ 'selectMembership' => array(
+ '0' => 1,
+ ),
+ 'payment_processor' => 1,
+ 'credit_card_number' => '4111111111111111',
+ 'credit_card_type' => 'Visa',
+ 'credit_card_exp_date' => array(
+ 'M' => 9,
+ 'Y' => 2040,
+ ),
+ 'cvv2' => 123,
+);
+
+try{
+ $result = civicrm_api3('contribution_page', 'Submit', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function contribution_page_submit_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 0,
+ 'values' => '',
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testSubmitMembershipBlockIsSeparatePaymentPaymentProcessor and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
'contact_id' => 2,
'amount' => '10',
'currency' => 'USD',
+ 'soft_credit_type_id' => 5,
);
try{
'pcp_display_in_roll' => '',
'pcp_roll_nickname' => '',
'pcp_personal_note' => '',
+ 'soft_credit_type_id' => '5',
),
),
);
'amount' => '10.00',
'currency' => 'USD',
'pcp_display_in_roll' => 0,
+ 'soft_credit_type_id' => '4',
),
),
);
--- /dev/null
+<?php
+/**
+ * Test Generated example of using country create API
+ * *
+ */
+function country_create_example(){
+$params = array(
+ 'name' => 'Made Up Land',
+ 'iso_code' => 'ML',
+ 'region_id' => 1,
+);
+
+try{
+ $result = civicrm_api3('country', 'create', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function country_create_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 1,
+ 'values' => array(
+ '1' => array(
+ 'id' => '1',
+ 'name' => 'Made Up Land',
+ 'iso_code' => 'ML',
+ 'country_code' => '',
+ 'address_format_id' => '',
+ 'idd_prefix' => '',
+ 'ndd_prefix' => '',
+ 'region_id' => '1',
+ 'is_province_abbreviated' => '',
+ ),
+ ),
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testCreateCountry and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example of using country delete API
+ * *
+ */
+function country_delete_example(){
+$params = array(
+ 'id' => 1,
+);
+
+try{
+ $result = civicrm_api3('country', 'delete', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function country_delete_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => 1,
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testDeleteCountry and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example of using country get API
+ * *
+ */
+function country_get_example(){
+$params = array(
+ 'iso_code' => 'ML',
+);
+
+try{
+ $result = civicrm_api3('country', 'get', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function country_get_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 1,
+ 'values' => array(
+ '1' => array(
+ 'id' => '1',
+ 'name' => 'Made Up Land',
+ 'iso_code' => 'ML',
+ 'region_id' => '1',
+ 'is_province_abbreviated' => 0,
+ ),
+ ),
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testGet and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CountryTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
'column_name' => 'name1_1',
'option_group_id' => '',
'filter' => '',
+ 'in_selector' => 0,
),
),
);
'0' => array(
'id' => '1',
'name' => 'Default Domain Name',
- 'config_backend' => 'a:82:{s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":4:{s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:12:\"versionCheck\";b:1;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:5:\"4.4.5\";}',
+ 'config_backend' => 'a:83:{s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:9:\"4.5.beta9\";s:11:\"empoweredBy\";b:1;s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":5:{s:19:\"supports_UF_Logging\";b:1;s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:12:\"versionCheck\";b:1;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;}',
'version' => '3',
'contact_id' => '3',
'locale_custom_strings' => 'a:1:{s:5:\"en_US\";a:0:{}}',
'1' => array(
'id' => '2',
'name' => 'Second Domain',
- 'config_backend' => 'a:82:{s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":4:{s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:12:\"versionCheck\";b:1;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:5:\"4.4.5\";}',
+ 'config_backend' => 'a:83:{s:18:\"fatalErrorTemplate\";s:20:\"CRM/common/fatal.tpl\";s:15:\"civiRelativeURL\";s:13:\"/index.php?q=\";s:11:\"civiVersion\";s:9:\"4.5.beta9\";s:11:\"empoweredBy\";b:1;s:10:\"userSystem\";O:26:\"CRM_Utils_System_UnitTests\":5:{s:19:\"supports_UF_Logging\";b:1;s:9:\"is_drupal\";b:0;s:9:\"is_joomla\";b:0;s:12:\"is_wordpress\";b:0;s:24:\"supports_form_extensions\";b:0;}s:11:\"initialized\";i:0;s:15:\"DAOFactoryClass\";s:23:\"CRM_Contact_DAO_Factory\";s:17:\"componentRegistry\";O:18:\"CRM_Core_Component\":0:{}s:9:\"inCiviCRM\";b:0;s:18:\"recaptchaPublicKey\";N;s:5:\"debug\";i:0;s:9:\"backtrace\";i:0;s:12:\"resourceBase\";N;s:13:\"extensionsURL\";N;s:12:\"countryLimit\";a:1:{i:0;s:4:\"1228\";}s:27:\"defaultContactStateProvince\";N;s:13:\"provinceLimit\";a:1:{i:0;s:4:\"1228\";}s:21:\"defaultContactCountry\";s:4:\"1228\";s:15:\"defaultCurrency\";s:3:\"USD\";s:10:\"lcMessages\";s:5:\"en_US\";s:18:\"dateformatDatetime\";s:20:\"%B %E%f, %Y %l:%M %P\";s:14:\"dateformatFull\";s:11:\"%B %E%f, %Y\";s:17:\"dateformatPartial\";s:5:\"%B %Y\";s:14:\"dateformatYear\";s:2:\"%Y\";s:14:\"dateformatTime\";s:8:\"%l:%M %P\";s:15:\"timeInputFormat\";i:1;s:15:\"dateInputFormat\";s:8:\"mm/dd/yy\";s:15:\"fiscalYearStart\";a:2:{s:1:\"M\";i:1;s:1:\"d\";i:1;}s:11:\"moneyformat\";s:5:\"%c %a\";s:16:\"moneyvalueformat\";s:3:\"%!i\";s:15:\"currencySymbols\";s:0:\"\";s:21:\"defaultCurrencySymbol\";s:1:\"$\";s:20:\"monetaryDecimalPoint\";s:1:\".\";s:25:\"monetaryThousandSeparator\";s:1:\",\";s:14:\"gettextCodeset\";s:5:\"utf-8\";s:13:\"gettextDomain\";s:7:\"civicrm\";s:27:\"userFrameworkUsersTableName\";s:5:\"users\";s:21:\"userFrameworkFrontend\";b:0;s:20:\"userFrameworkLogging\";b:0;s:17:\"maxImportFileSize\";i:2097152;s:11:\"maxFileSize\";i:2;s:11:\"mapProvider\";N;s:9:\"mapAPIKey\";N;s:11:\"geoProvider\";N;s:9:\"geoAPIKey\";N;s:13:\"geocodeMethod\";s:0:\"\";s:12:\"mapGeoCoding\";i:1;s:7:\"logging\";b:0;s:12:\"versionCheck\";b:1;s:16:\"enableComponents\";a:6:{i:0;s:14:\"CiviContribute\";i:1;s:10:\"CiviPledge\";i:2;s:10:\"CiviMember\";i:3;s:9:\"CiviEvent\";i:4;s:8:\"CiviMail\";i:5;s:10:\"CiviReport\";}s:18:\"enableComponentIDs\";a:6:{i:0;i:1;i:1;i:6;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:8;}s:9:\"enableSSL\";b:0;s:17:\"fatalErrorHandler\";N;s:14:\"legacyEncoding\";s:12:\"Windows-1252\";s:14:\"fieldSeparator\";s:1:\",\";s:17:\"maxLocationBlocks\";i:2;s:15:\"captchaFontPath\";s:25:\"/usr/X11R6/lib/X11/fonts/\";s:11:\"captchaFont\";s:17:\"HelveticaBold.ttf\";s:21:\"includeWildCardInName\";i:1;s:18:\"includeEmailInName\";i:1;s:21:\"includeNickNameInName\";i:0;s:22:\"smartGroupCacheTimeout\";i:5;s:22:\"defaultSearchProfileID\";N;s:21:\"dashboardCacheTimeout\";i:1440;s:15:\"doNotResetCache\";i:0;s:24:\"includeAlphabeticalPager\";i:1;s:20:\"includeOrderByClause\";i:1;s:13:\"oldInputStyle\";i:1;s:14:\"formKeyDisable\";b:0;s:21:\"doNotAttachPDFReceipt\";b:0;s:15:\"wkhtmltopdfPath\";b:0;s:23:\"secondDegRelPermissions\";b:0;s:10:\"wpBasePage\";N;s:9:\"groupTree\";b:0;s:11:\"revampPages\";a:0:{}s:13:\"verpSeparator\";s:1:\".\";s:12:\"mailerPeriod\";i:180;s:16:\"mailerSpoolLimit\";i:0;s:16:\"mailerBatchLimit\";i:0;s:13:\"mailerJobSize\";i:0;s:13:\"mailerJobsMax\";i:0;s:16:\"mailThrottleTime\";i:0;s:12:\"customCSSURL\";N;}',
'version' => '4.3.alpha1',
'contact_id' => '2',
'domain_email' => '\"Domain Email\" <domainemail2@example.org>',
'last_name' => '',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'job_title' => '',
'gender_id' => '',
'birth_date' => '',
'world_region' => '',
'individual_prefix' => '',
'individual_suffix' => '',
+ 'communication_style' => '',
'gender' => '',
'state_province_name' => '',
'state_province' => '',
'currency' => '',
'campaign_id' => '',
'is_share' => '',
+ 'is_confirm_enabled' => '',
'parent_event_id' => '',
'slot_label_id' => '',
+ 'dedupe_rule_group_id' => '',
),
),
);
'is_template' => 0,
'created_date' => '2013-07-28 08:49:19',
'is_share' => '1',
+ 'is_confirm_enabled' => '1',
),
),
);
'is_template' => 0,
'created_date' => '2013-07-28 08:49:19',
'is_share' => '1',
+ 'is_confirm_enabled' => '1',
),
),
);
'is_multiple_registrations' => 0,
'allow_same_participant_emails' => 0,
'is_template' => 0,
- 'created_date' => '2014-02-13 00:22:14',
+ 'created_date' => '2014-09-28 23:20:52',
'is_share' => '1',
+ 'is_confirm_enabled' => '1',
'available_places' => 0,
'is_full' => '1',
);
*/
function grant_delete_example(){
$params = array(
- 'id' => 3,
+ 'id' => 1,
);
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 1,
'values' => array(
- '2' => array(
- 'id' => '2',
- 'contact_id' => '4',
+ '1' => array(
+ 'id' => '1',
+ 'contact_id' => '5',
'application_received_date' => '20130728084957',
'decision_date' => '20130805000000',
'grant_type_id' => '1',
'name' => 'Test Group 1',
'title' => 'New Test Group Created',
'description' => 'New Test Group Created',
- 'source' => '',
- 'saved_search_id' => '',
'is_active' => '1',
'visibility' => 'Public Pages',
'where_clause' => ' ( `civicrm_group_contact-4`.group_id IN ( 4 ) AND `civicrm_group_contact-4`.status IN (\"Added\") ) ',
'0' => '1',
'1' => '2',
),
- 'cache_date' => '',
- 'refresh_date' => '',
- 'parents' => '',
- 'children' => '',
'is_hidden' => 0,
'is_reserved' => 0,
- 'created_id' => '',
),
),
);
$expectedResult = array(
'is_error' => 0,
'version' => 3,
- 'count' => 19,
+ 'count' => 20,
'values' => array(
'id' => array(
'name' => 'id',
'title' => 'Group Description',
'rows' => 2,
'cols' => 60,
+ 'html' => array(
+ 'type' => 'TextArea',
+ ),
),
'source' => array(
'name' => 'source',
'name' => 'visibility',
'type' => 2,
'title' => 'Group Visibility Setting',
+ 'maxlength' => 24,
+ 'size' => 20,
'default' => 'User and User Admin Only',
- 'enumValues' => 'User and User Admin Only,Public Pages',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
+ 'pseudoconstant' => array(
+ 'callback' => 'CRM_Core_SelectValues::groupVisibility',
+ ),
),
'where_clause' => array(
'name' => 'where_clause',
'title' => 'Group Created By',
'FKClassName' => 'CRM_Contact_DAO_Contact',
),
+ 'modified_id' => array(
+ 'name' => 'modified_id',
+ 'type' => 1,
+ 'title' => 'Group Modified By',
+ 'FKClassName' => 'CRM_Contact_DAO_Contact',
+ ),
),
);
*/
function group_contact_delete_example(){
$params = array(
- 'contact_id' => 1,
- 'group_id' => 1,
+ 'id' => 4,
+ 'skip_undelete' => true,
);
try{
'count' => 1,
'values' => 1,
'total_count' => 1,
- 'removed' => 1,
+ 'removed' => 0,
'not_removed' => 0,
);
/*
* This example has been generated from the API test suite. The test that created it is called
*
-* testDelete and can be found in
+* testDeletePermanent and can be found in
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/GroupContactTest.php
*
* You can see the outcome of the API tests at
'name' => 'Test Group 1',
'title' => 'New Test Group Created',
'description' => 'New Test Group Created',
- 'source' => '',
- 'saved_search_id' => '',
'is_active' => '1',
'visibility' => 'Public Pages',
'where_clause' => ' ( `civicrm_group_contact-1`.group_id IN ( 1 ) AND `civicrm_group_contact-1`.status IN (\"Added\") ) ',
'0' => '1',
'1' => '2',
),
- 'cache_date' => '',
- 'refresh_date' => '',
- 'parents' => '',
- 'children' => '',
'is_hidden' => 0,
'is_reserved' => 0,
- 'created_id' => '',
),
),
),
'name' => 'Test Group 1',
'title' => 'New Test Group Created',
'description' => 'New Test Group Created',
- 'source' => '',
- 'saved_search_id' => '',
'is_active' => '1',
'visibility' => 'Public Pages',
'where_clause' => ' ( `civicrm_group_contact-1`.group_id IN ( 1 ) AND `civicrm_group_contact-1`.status IN (\"Added\") ) ',
'0' => '1',
'1' => '2',
),
- 'cache_date' => '',
- 'refresh_date' => '',
- 'parents' => '',
- 'children' => '',
'is_hidden' => 0,
'is_reserved' => 0,
- 'created_id' => '',
),
),
),
*/
function job_delete_expectedresult(){
- $expectedResult = array(
- 'is_error' => 0,
- 'version' => 3,
- 'count' => 1,
- 'values' => true,
-);
+ $expectedResult = '';
return $expectedResult;
}
'id' => '1',
'entity_table' => 'civicrm_contribution',
'entity_id' => '1',
+ 'contribution_id' => '',
'price_field_id' => '1',
'label' => 'line item',
'qty' => '1',
'id' => '1',
'entity_table' => 'civicrm_contribution',
'entity_id' => '1',
+ 'contribution_id' => '1',
'price_field_id' => '1',
'label' => 'Contribution Amount',
'qty' => '1',
<?php
/**
- * Test Generated example of using loc_block createEntities API
- * Create entities and location block in 1 api call *
+ * Test Generated example of using loc_block create API
+ * Create entities and locBlock in 1 api call *
*/
-function loc_block_createentities_example(){
+function loc_block_create_example(){
$params = array(
'email' => array(
'location_type_id' => 1,
);
try{
- $result = civicrm_api3('loc_block', 'createEntities', $params);
+ $result = civicrm_api3('loc_block', 'create', $params);
}
catch (CiviCRM_API3_Exception $e) {
// handle error here
/**
* Function returns array of result expected from previous function
*/
-function loc_block_createentities_expectedresult(){
+function loc_block_create_expectedresult(){
$expectedResult = array(
'is_error' => 0,
'manual_geo_code' => 0,
),
'email' => array(
- 'id' => '4',
+ 'id' => '33',
'contact_id' => '',
'location_type_id' => '1',
'email' => 'test2@loc.block',
),
'id' => '3',
'address_id' => '3',
- 'email_id' => '4',
+ 'email_id' => '33',
'phone_id' => '3',
'im_id' => '',
'address_2_id' => '',
'3' => array(
'id' => '3',
'address_id' => '3',
- 'email_id' => '4',
+ 'email_id' => '33',
'phone_id' => '3',
'phone_2_id' => '4',
'address' => array(
'manual_geo_code' => 0,
),
'email' => array(
- 'id' => '4',
+ 'id' => '33',
'location_type_id' => '1',
'email' => 'test2@loc.block',
'is_primary' => 0,
* This example has been generated from the API test suite. The test that created it is called
*
* testCreateLocBlockEntities and can be found in
-* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/LocBlockTest.php
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
*
* You can see the outcome of the API tests at
-* http://tests.dev.civicrm.org/trunk/results-api_v3
+* https://test.civicrm.org/job/CiviCRM-master-git/
*
* To Learn about the API read
-* http://book.civicrm.org/developer/current/techniques/api/
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
*
-* and review the wiki at
-* http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
*
* Read more about testing here
* http://wiki.civicrm.org/confluence/display/CRM/Testing
$params = array(
'address_id' => 2,
'phone_id' => 2,
- 'email_id' => 3,
+ 'email_id' => 32,
);
try{
'2' => array(
'id' => '2',
'address_id' => '2',
- 'email_id' => '3',
+ 'email_id' => '32',
'phone_id' => '2',
'im_id' => '',
'address_2_id' => '',
* This example has been generated from the API test suite. The test that created it is called
*
* testCreateLocBlock and can be found in
-* http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/LocBlockTest.php
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/LocBlockTest.php
*
* You can see the outcome of the API tests at
-* http://tests.dev.civicrm.org/trunk/results-api_v3
+* https://test.civicrm.org/job/CiviCRM-master-git/
*
* To Learn about the API read
-* http://book.civicrm.org/developer/current/techniques/api/
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
*
-* and review the wiki at
-* http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
*
* Read more about testing here
* http://wiki.civicrm.org/confluence/display/CRM/Testing
'id' => '1',
'domain_id' => '1',
'name' => 'default',
- 'is_default' => '1',
+ 'is_default' => 0,
'domain' => 'EXAMPLE.ORG',
'api.MailSettings.delete' => array(
'is_error' => 0,
'values' => 1,
),
),
- '3' => array(
- 'id' => '3',
+ '6' => array(
+ 'id' => '6',
'domain_id' => '1',
'name' => 'my mail setting',
- 'is_default' => 0,
+ 'is_default' => '1',
'domain' => 'setting.com',
'server' => 'localhost',
'username' => 'sue',
'server' => 'localhost',
'username' => 'sue',
'password' => 'pass',
+ 'is_default' => 1,
);
try{
'id' => '2',
'domain_id' => '1',
'name' => 'my mail setting',
- 'is_default' => '',
+ 'is_default' => '1',
'domain' => 'setting.com',
'localpart' => '',
'return_path' => '',
*/
function mail_settings_delete_example(){
$params = array(
- 'id' => 2,
+ 'id' => 5,
);
try{
'server' => 'localhost',
'username' => 'sue',
'password' => 'pass',
+ 'is_default' => 1,
);
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 4,
'values' => array(
- '2' => array(
- 'id' => '2',
+ '4' => array(
+ 'id' => '4',
'domain_id' => '1',
'name' => 'my mail setting',
- 'is_default' => 0,
+ 'is_default' => '1',
'domain' => 'setting.com',
'server' => 'localhost',
'username' => 'sue',
--- /dev/null
+<?php
+/**
+ * Test Generated example of using mailing create API
+ * *
+ */
+function mailing_create_example(){
+$params = array(
+ 'subject' => 'maild',
+ 'body_text' => 'bdkfhdskfhduew',
+ 'name' => 'mailing name',
+ 'created_id' => 1,
+);
+
+try{
+ $result = civicrm_api3('mailing', 'create', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function mailing_create_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 1,
+ 'values' => array(
+ '1' => array(
+ 'id' => '1',
+ 'domain_id' => '1',
+ 'header_id' => '',
+ 'footer_id' => '',
+ 'reply_id' => '',
+ 'unsubscribe_id' => '',
+ 'resubscribe_id' => '',
+ 'optout_id' => '',
+ 'name' => 'mailing name',
+ 'from_name' => 'FIXME',
+ 'from_email' => 'info@EXAMPLE.ORG',
+ 'replyto_email' => 'info@EXAMPLE.ORG',
+ 'subject' => 'maild',
+ 'body_text' => 'bdkfhdskfhduew',
+ 'body_html' => '',
+ 'url_tracking' => '1',
+ 'forward_replies' => '',
+ 'auto_responder' => 0,
+ 'open_tracking' => '1',
+ 'is_completed' => '',
+ 'msg_template_id' => '',
+ 'override_verp' => '1',
+ 'created_id' => '1',
+ 'created_date' => '2013-07-28 08:49:19',
+ 'scheduled_id' => '',
+ 'scheduled_date' => '',
+ 'approver_id' => '',
+ 'approval_date' => '',
+ 'approval_status_id' => '',
+ 'approval_note' => '',
+ 'is_archived' => '',
+ 'visibility' => 'Public Pages',
+ 'campaign_id' => '',
+ 'dedupe_email' => '',
+ 'sms_provider_id' => '',
+ 'hash' => '',
+ 'api.mailing_job.create' => array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 1,
+ 'values' => array(
+ '0' => array(
+ 'id' => '1',
+ 'mailing_id' => '1',
+ 'scheduled_date' => '20130728085413',
+ 'start_date' => '',
+ 'end_date' => '',
+ 'status' => 'Scheduled',
+ 'is_test' => 0,
+ 'job_type' => '',
+ 'parent_id' => '',
+ 'job_offset' => '',
+ 'job_limit' => '',
+ ),
+ ),
+ ),
+ ),
+ ),
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testMailerCreateSuccess and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
--- /dev/null
+<?php
+/**
+ * Test Generated example of using mailing delete API
+ * *
+ */
+function mailing_delete_example(){
+$params = array(
+ 'id' => 2,
+);
+
+try{
+ $result = civicrm_api3('mailing', 'delete', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function mailing_delete_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'values' => true,
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testMailerDeleteSuccess and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/MailingTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
*/
function membership_create_example(){
$params = array(
- 'contact_id' => 31,
- 'membership_type_id' => 50,
+ 'contact_id' => 88,
+ 'membership_type_id' => 53,
'join_date' => '2009-01-21',
'start_date' => '2009-01-21',
'end_date' => '2009-12-21',
'source' => 'Payment',
'is_override' => 1,
- 'status_id' => 32,
+ 'status_id' => 33,
'custom_1' => 'custom string',
);
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '31',
- 'membership_type_id' => '50',
+ 'contact_id' => '88',
+ 'membership_type_id' => '53',
'join_date' => '20090121000000',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '32',
+ 'status_id' => '33',
'is_override' => '1',
'owner_membership_id' => '',
'max_related' => '',
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '15',
+ 'contact_id' => '35',
'membership_type_id' => '21',
'join_date' => '2009-01-21',
'start_date' => '2013-07-29 00:00:00',
*/
function membership_update_example(){
$params = array(
- 'contact_id' => 37,
- 'membership_type_id' => 62,
+ 'contact_id' => 106,
+ 'membership_type_id' => 65,
'join_date' => '2009-01-21',
'start_date' => '2009-01-21',
'end_date' => '2009-12-21',
'source' => 'Payment',
'is_override' => 1,
- 'status_id' => 38,
+ 'status_id' => 39,
'custom_1' => 'custom string',
);
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '37',
- 'membership_type_id' => '62',
+ 'contact_id' => '106',
+ 'membership_type_id' => '65',
'join_date' => '20090121000000',
'start_date' => '2013-07-29 00:00:00',
'end_date' => '2013-08-04 00:00:00',
'source' => 'Payment',
- 'status_id' => '38',
+ 'status_id' => '39',
'is_override' => '1',
'owner_membership_id' => '',
'max_related' => '',
*/
function membership_get_example(){
$params = array(
- 'contact_id' => 18,
+ 'contact_id' => 44,
'filters' => array(
'is_current' => 1,
),
'values' => array(
'1' => array(
'id' => '1',
- 'contact_id' => '18',
+ 'contact_id' => '44',
'membership_type_id' => '27',
'join_date' => '2009-01-21',
'start_date' => '2013-07-29 00:00:00',
'relationship_type_id' => '',
'relationship_direction' => '',
'max_related' => '',
- 'visibility' => '1',
+ 'visibility' => 'Public',
'weight' => '',
'receipt_text_signup' => '',
'receipt_text_renewal' => '',
'duration_unit' => 'year',
'duration_interval' => '1',
'period_type' => 'rolling',
- 'visibility' => '1',
+ 'visibility' => 'Public',
'auto_renew' => 0,
'is_active' => '1',
),
*/
function message_template_create_example(){
$params = array(
- 'msg_title' => 'msg_title_1',
- 'msg_subject' => 'msg_subject_1',
- 'msg_text' => 'msg_text_1',
- 'msg_html' => 'msg_html_1',
- 'workflow_id' => 1,
+ 'msg_title' => 'msg_title_131',
+ 'msg_subject' => 'msg_subject_131',
+ 'msg_text' => 'msg_text_131',
+ 'msg_html' => 'msg_html_131',
+ 'workflow_id' => 131,
'is_default' => '1',
'is_reserved' => 1,
);
'values' => array(
'2' => array(
'id' => '2',
- 'msg_title' => 'msg_title_1',
- 'msg_subject' => 'msg_subject_1',
- 'msg_text' => 'msg_text_1',
- 'msg_html' => 'msg_html_1',
+ 'msg_title' => 'msg_title_131',
+ 'msg_subject' => 'msg_subject_131',
+ 'msg_text' => 'msg_text_131',
+ 'msg_html' => 'msg_html_131',
'is_active' => '1',
- 'workflow_id' => '1',
+ 'workflow_id' => '131',
'is_default' => '1',
'is_reserved' => '1',
'pdf_format_id' => '',
*/
function message_template_get_example(){
$params = array(
- 'msg_title' => 'msg_title_2',
- 'msg_subject' => 'msg_subject_2',
- 'msg_text' => 'msg_text_2',
- 'msg_html' => 'msg_html_2',
- 'workflow_id' => 2,
+ 'msg_title' => 'msg_title_132',
+ 'msg_subject' => 'msg_subject_132',
+ 'msg_text' => 'msg_text_132',
+ 'msg_html' => 'msg_html_132',
+ 'workflow_id' => 132,
'is_default' => '1',
'is_reserved' => 1,
);
'values' => array(
'1' => array(
'id' => '1',
- 'msg_title' => 'msg_title_2',
- 'msg_subject' => 'msg_subject_2',
- 'msg_text' => 'msg_text_2',
- 'msg_html' => 'msg_html_2',
+ 'msg_title' => 'msg_title_132',
+ 'msg_subject' => 'msg_subject_132',
+ 'msg_text' => 'msg_text_132',
+ 'msg_html' => 'msg_html_132',
'is_active' => '1',
- 'workflow_id' => '2',
+ 'workflow_id' => '132',
'is_default' => '1',
'is_reserved' => '1',
- 'pdf_format_id' => '1',
+ 'pdf_format_id' => '132',
),
),
);
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 86,
+ 'id' => 89,
'values' => array(
'0' => array(
- 'id' => '86',
+ 'id' => '89',
'name' => 'civicrm_event.amount.560',
'title' => '',
'description' => '',
'is_reserved' => '1',
'is_active' => '1',
- 'api.OptionValue.create' => 727,
+ 'is_locked' => '',
+ 'api.OptionValue.create' => 764,
),
),
);
*/
function option_group_delete_example(){
$params = array(
- 'id' => 91,
+ 'id' => 94,
);
try{
'title' => 'Preferred Communication Method',
'is_reserved' => '1',
'is_active' => '1',
+ 'is_locked' => 0,
),
),
);
<?php
/**
* Test Generated example of using participant create API
- * single function to create contact w participation & contribution. Note that in the
+ * single function to create contact w partipation & contribution. Note that in the
case of 'contribution' the 'create' is implied (api.contribution.create) *
*/
function participant_create_example(){
'contact_type' => 'Individual',
'display_name' => 'dlobo',
'api.participant' => array(
- 'event_id' => 39,
+ 'event_id' => 40,
'status_id' => 1,
'role_id' => 1,
'format.only_id' => 1,
'last_name' => '',
'prefix_id' => '',
'suffix_id' => '',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => '',
'event_type' => 'Conference',
'participant_status_id' => '2',
'participant_status' => 'Attended',
+ 'participant_role' => 'Attendee',
'participant_role_id' => '1',
'participant_register_date' => '2007-02-19 00:00:00',
'participant_source' => 'Wimbeldon',
'contact_sub_type' => '',
'sort_name' => 'Anderson, Anthony',
'display_name' => 'Mr. Anthony Anderson II',
- 'event_id' => '38',
+ 'event_id' => '39',
'event_title' => 'Annual CiviCRM meet',
'event_start_date' => '2013-07-29 00:00:00',
'event_end_date' => '2013-08-04 00:00:00',
'event_type' => 'Conference',
'participant_status_id' => '2',
'participant_status' => 'Attended',
+ 'participant_role' => 'Attendee',
'participant_role_id' => '1',
'participant_register_date' => '2007-02-19 00:00:00',
'participant_source' => 'Wimbeldon',
'contact_sub_type' => '',
'sort_name' => 'Anderson, Anthony',
'display_name' => 'Mr. Anthony Anderson II',
- 'event_id' => '38',
+ 'event_id' => '39',
'event_title' => 'Annual CiviCRM meet',
'event_start_date' => '2013-07-29 00:00:00',
'event_end_date' => '2013-08-04 00:00:00',
'event_type' => 'Conference',
'participant_status_id' => '2',
'participant_status' => 'Attended',
+ 'participant_role' => 'Attendee',
'participant_role_id' => '1',
'participant_register_date' => '2007-02-19 00:00:00',
'participant_source' => 'Wimbeldon',
'event_type' => 'Conference',
'participant_status_id' => '2',
'participant_status' => 'Attended',
+ 'participant_role' => 'Attendee',
'participant_role_id' => '1',
'participant_register_date' => '2007-02-19 00:00:00',
'participant_source' => 'Wimbeldon',
'is_template' => 0,
'created_date' => '2013-07-28 08:49:19',
'is_share' => '1',
+ 'is_confirm_enabled' => '1',
),
),
),
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 14,
+ 'id' => 16,
'values' => array(
- '14' => array(
- 'id' => '14',
+ '16' => array(
+ 'id' => '16',
'name' => 'test status',
'label' => 'I am a test',
- 'class' => 'Positive',
+ 'class' => '14',
'is_reserved' => 0,
'is_active' => '1',
'is_counted' => '1',
*/
function participant_status_type_delete_example(){
$params = array(
- 'id' => 15,
+ 'id' => 17,
);
try{
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 14,
+ 'id' => 16,
'values' => array(
- '14' => array(
- 'id' => '14',
+ '16' => array(
+ 'id' => '16',
'name' => 'test status',
'label' => 'I am a test',
- 'class' => 'Positive',
+ 'class' => '14',
'is_reserved' => 0,
'is_active' => '1',
'is_counted' => '1',
function pledge_create_example(){
$params = array(
'contact_id' => 11,
- 'pledge_create_date' => '20140213',
- 'start_date' => '20140213',
- 'scheduled_date' => '20140215',
+ 'pledge_create_date' => '20140928',
+ 'start_date' => '20140928',
+ 'scheduled_date' => '20140930',
'amount' => '100',
'pledge_status_id' => '2',
'pledge_financial_type_id' => '1',
'modified_date' => '',
'cancel_date' => '',
'end_date' => '',
- 'honor_contact_id' => '',
- 'honor_type_id' => '',
'max_reminders' => '',
'initial_reminder_day' => '',
'additional_reminder_day' => '',
'display_name' => 'Mr. Anthony Anderson II',
'pledge_id' => '1',
'pledge_amount' => '100.00',
- 'pledge_create_date' => '2014-02-13 00:00:00',
+ 'pledge_create_date' => '2014-09-28 00:00:00',
'pledge_status' => 'Pending',
'pledge_total_paid' => '',
- 'pledge_next_pay_date' => '2014-02-15 00:00:00',
+ 'pledge_next_pay_date' => '2014-09-30 00:00:00',
'pledge_next_pay_amount' => '20.00',
'pledge_outstanding_amount' => '',
'pledge_financial_type' => 'Donation',
*/
function pledge_get_example(){
$params = array(
- 'pledge_start_date_high' => '20140211002809',
+ 'pledge_start_date_high' => '20140926232809',
);
try{
'display_name' => 'Mr. Anthony Anderson II',
'pledge_id' => '2',
'pledge_amount' => '100.00',
- 'pledge_create_date' => '2014-02-13 00:00:00',
+ 'pledge_create_date' => '2014-09-28 00:00:00',
'pledge_status' => 'Overdue',
'pledge_total_paid' => '',
'pledge_next_pay_date' => '2013-03-01 00:00:00',
*/
function price_set_delete_example(){
$params = array(
- 'id' => 17,
+ 'id' => 18,
);
try{
function profile_apply_example(){
$params = array(
'profile_id' => 31,
- 'contact_id' => 2,
+ 'contact_id' => 3,
'first_name' => 'abc2',
'last_name' => 'xyz2',
'email-Primary' => 'abc2.xyz2@gmail.com',
'values' => array(
'contact_type' => 'Individual',
'contact_sub_type' => '',
- 'contact_id' => 2,
+ 'contact_id' => 3,
'version' => 3,
'debug' => 1,
'profile_id' => 31,
function profile_get_example(){
$params = array(
'profile_id' => array(
- '0' => 14,
+ '0' => 15,
'1' => 1,
'2' => 'Billing',
),
- 'contact_id' => 2,
+ 'contact_id' => 3,
);
try{
'version' => 3,
'count' => 3,
'values' => array(
- '14' => array(
+ '15' => array(
'postal_code-1' => '90210',
'state_province-1' => '1021',
'country-1' => '1228',
'option_group_id' => '',
'date_format' => '',
'time_format' => '',
+ 'is_required' => 0,
'name' => 'custom_1',
+ 'title' => 'first_name',
'type' => 2,
'api.required' => '1',
- 'title' => 'first_name',
'help_pre' => '',
'help_post' => '',
'entity' => 'contact',
'type' => 1,
'title' => 'State Province',
'FKClassName' => 'CRM_Core_DAO_StateProvince',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'table' => 'civicrm_state_province',
'keyColumn' => 'id',
'type' => 1,
'title' => 'Country',
'FKClassName' => 'CRM_Core_DAO_Country',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'table' => 'civicrm_country',
'keyColumn' => 'id',
'dataPattern' => '/^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$/',
'export' => true,
'rule' => 'email',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
'headerPattern' => '/^last|(l(ast\\s)?name)$/i',
'dataPattern' => '/^\\w+(\\s\\w+)?+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
'headerPattern' => '/^first|(f(irst\\s)?name)$/i',
'dataPattern' => '/^\\w+$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
'api.required' => '1',
'help_pre' => '',
'help_post' => '',
),
'profile_id' => array(
'api.required' => true,
+ 'title' => 'Profile ID',
),
),
);
function profile_submit_example(){
$params = array(
'profile_id' => 29,
- 'contact_id' => 2,
+ 'contact_id' => 3,
'first_name' => 'abc2',
'last_name' => 'xyz2',
'email-primary' => 'abc2.xyz2@gmail.com',
'is_error' => 0,
'version' => 3,
'count' => 1,
- 'id' => 2,
+ 'id' => 3,
'values' => array(
- '2' => array(
- 'id' => '2',
+ '3' => array(
+ 'id' => '3',
'contact_type' => 'Individual',
'contact_sub_type' => '',
'do_not_email' => 0,
'legal_identifier' => '',
'external_identifier' => '',
'sort_name' => 'xyz2, abc2',
- 'display_name' => 'abc2 xyz2',
+ 'display_name' => 'Mr. abc2 xyz2 II',
'nick_name' => '',
'legal_name' => '',
'image_URL' => '',
'last_name' => 'xyz2',
'prefix_id' => '3',
'suffix_id' => '3',
+ 'formal_title' => '',
+ 'communication_style_id' => '',
'email_greeting_id' => '1',
'email_greeting_custom' => '',
'email_greeting_display' => 'Dear abc1',
'0' => array(
'civicrm_contact_sort_name' => 'Default Organization',
'civicrm_contact_id' => '1',
- 'civicrm_address_street_address' => '',
- 'civicrm_address_city' => '',
- 'civicrm_country_name' => '',
),
'1' => array(
'civicrm_contact_sort_name' => 'Second Domain',
'civicrm_contact_id' => '2',
- 'civicrm_address_street_address' => '15 Main St',
- 'civicrm_address_city' => 'Collinsville',
- 'civicrm_country_name' => 'United States',
),
),
'metadata' => array(
'labels' => array(
'civicrm_contact_sort_name' => 'Contact Name',
'civicrm_contact_id' => 'Internal Contact ID',
- 'civicrm_address_street_address' => 'Street Address',
- 'civicrm_address_city' => 'City',
- 'civicrm_country_name' => 'Country',
),
),
);
$expectedResult = array(
'is_error' => 0,
'version' => 3,
- 'count' => 82,
+ 'count' => 89,
'values' => array(
'address_standardization_provider' => array(
'group_name' => 'Address Preferences',
'html_type' => 'Text',
'default' => '{contact.last_name}{, }{contact.first_name}',
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Sort Name Format',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'html_type' => 'Text',
'default' => '',
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Wysiwig Editor',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'html_type' => 'Text',
'default' => '',
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Ajax Check Similar',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => '',
+ 'help_text' => '',
+ ),
+ 'ajaxPopupsEnabled' => array(
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'ajaxPopupsEnabled',
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => 1,
+ 'add' => '4.5',
+ 'title' => 'Ajax Popups Enabled',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'6' => '7',
),
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Contact Reference Options',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
When enabled, statistics about your CiviCRM installation are reported anonymously to the CiviCRM team to assist in prioritizing ongoing development efforts. The following information is gathered: CiviCRM version, versions of PHP, MySQL and framework (Drupal/Joomla/standalone), and default language. Counts (but no actual data) of the following record types are reported: contacts, activities, cases, relationships, contributions, contribution pages, contribution products, contribution widgets, discounts, price sets, profiles, events, participants, tell-a-friend pages, grants, mailings, memberships, membership blocks, pledges, pledge blocks and active payment processor types.',
'help_text' => '',
),
+ 'securityAlert' => array(
+ 'group_name' => 'CiviCRM Preferences',
+ 'group' => 'core',
+ 'name' => 'versionCheck',
+ 'prefetch' => 0,
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => 1,
+ 'add' => '4.4',
+ 'title' => 'Security Alerts',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'If enabled, CiviCRM will automatically run checks for significant mis-configurations such as ineffective file protections.',
+ 'help_text' => '',
+ ),
'doNotAttachPDFReceipt' => array(
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'group' => 'core',
'name' => 'checksumTimeout',
'prefetch' => 1,
- 'config_only' => 1,
'type' => 'Integer',
'quick_form_type' => 'Element',
'html_type' => 'Text',
'group' => 'core',
'name' => 'blogUrl',
'prefetch' => 0,
- 'config_only' => 0,
'type' => 'String',
'quick_form_type' => 'Element',
'html_type' => 'Text',
'group' => 'core',
'name' => 'communityMessagesUrl',
'prefetch' => 0,
- 'config_only' => 1,
'type' => 'String',
'quick_form_type' => 'Element',
'html_type' => 'Text',
'quick_form_type' => 'YesNo',
'default' => 1,
'add' => '4.3',
- 'title' => '',
+ 'title' => 'Verify SSL?',
'is_domain' => 1,
'is_contact' => 0,
'description' => 'If disabled, backend HTTPS services will allow unverified, insecure connections',
'group' => 'core',
'name' => 'secondDegRelPermissions',
'prefetch' => 1,
- 'config_only' => 1,
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 0,
'group_name' => 'CiviCRM Preferences',
'group' => 'core',
'name' => 'empoweredBy',
+ 'prefetch' => 1,
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 1,
'add' => '4.5',
- 'title' => 'Display "empowered by CiviCRM"',
+ 'title' => 'Display \"empowered by CiviCRM\"',
'is_domain' => 1,
'is_contact' => 0,
- 'description' => 'When enabled, "empowered by CiviCRM" is displayed at the bottom of public forms.',
+ 'description' => 'When enabled, \"empowered by CiviCRM\" is displayed at the bottom of public forms.',
'help_text' => '',
),
'debug_enabled' => array(
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'debug_enabled',
- 'config_only' => 1,
'config_key' => 'debug',
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'userFrameworkLogging',
- 'config_only' => 1,
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 0,
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'backtrace',
- 'config_only' => 1,
'type' => 'Boolean',
'quick_form_type' => 'YesNo',
'default' => 0,
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'fatalErrorTemplate',
- 'config_only' => 1,
'type' => 'String',
- 'quick_form_type' => 'text',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
'default' => 'CRM/common/fatal.tpl',
'add' => '4.3',
'title' => 'Fatal Error Template',
'group_name' => 'Developer Preferences',
'group' => 'developer',
'name' => 'fatalErrorHandler',
- 'config_only' => 1,
'type' => 'String',
- 'quick_form_type' => 'text',
- 'default' => 'null',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'default' => '',
'add' => '4.3',
'title' => 'Fatal Error Handler',
'is_domain' => 1,
'default' => '',
'add' => '4.1',
'prefetch' => 1,
- 'title' => '',
+ 'title' => 'Upload Directory',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
- 'help_text' => 'If set, new contacts that are created when signing a petition are assigned a tag of this name.',
+ 'help_text' => '',
),
'imageUploadDir' => array(
'group_name' => 'Directory Preferences',
'default' => '',
'add' => '4.1',
'prefetch' => 1,
- 'title' => '',
+ 'title' => 'Image Directory',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'default' => '',
'add' => '4.1',
'prefetch' => 1,
- 'title' => '',
+ 'title' => 'Custom Files Upload Directory',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'default' => '',
'add' => '4.1',
'prefetch' => 1,
- 'title' => '',
+ 'title' => 'Custom Template Directory',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'default' => '',
'add' => '4.1',
'prefetch' => 1,
- 'title' => '',
+ 'title' => 'Custom PHP Path',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'default' => '',
'add' => '4.1',
'prefetch' => 1,
- 'title' => '',
+ 'title' => 'Extensions Directory',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Use CiviMail Workflow',
'is_domain' => 1,
'is_contact' => 0,
'description' => 'When CiviMail is enabled, users who \"subscribe\" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Lock Mails Server-Wide for Mail Sending',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'html_type' => 'checkbox',
'default' => 0,
'add' => '4.1',
- 'title' => '',
+ 'title' => 'Mailing Backend',
'is_domain' => 1,
'is_contact' => 0,
'description' => '',
'description' => 'Don\'t check for presence of mandatory tokens (domain address; unsubscribe/opt-out) before sending mailings. WARNING: Mandatory tokens are a safe-guard which facilitate compliance with the US CAN-SPAM Act. They should only be disabled if your organization adopts other mechanisms for compliance or if your organization is not subject to CAN-SPAM.',
'help_text' => '',
),
+ 'dedupe_email_default' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'dedupe_email_default',
+ 'type' => 'Integer',
+ 'html_type' => 'checkbox',
+ 'default' => 1,
+ 'add' => '4.5',
+ 'title' => 'CiviMail dedupes e-mail addresses by default',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Set the \"dedupe e-mail\" option when sending a new mailing to \"true\" by default.',
+ 'help_text' => '',
+ ),
+ 'hash_mailing_url' => array(
+ 'group_name' => 'Mailing Preferences',
+ 'group' => 'mailing',
+ 'name' => 'hash_mailing_url',
+ 'type' => 'Integer',
+ 'html_type' => 'checkbox',
+ 'default' => 0,
+ 'add' => '4.5',
+ 'title' => 'Hashed Mailing URL\'s',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'If enabled, a randomized hash key will be used to reference the mailing URL in the mailing.viewUrl token, instead of the mailing ID',
+ 'help_text' => '',
+ ),
'default_renewal_contribution_page' => array(
'group_name' => 'Member Preferences',
'group' => 'member',
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'is_enabled',
+ 'title' => 'Multisite Is enabled',
'type' => 'Integer',
'default' => '',
'add' => '4.1',
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'domain_group_id',
+ 'title' => 'Multisite Domain Group',
'type' => 'Integer',
'default' => '',
'add' => '4.1',
'group_name' => 'Multi Site Preferences',
'group' => 'multisite',
'name' => 'event_price_set_domain_id',
+ 'title' => 'Domain Event Price Set',
'type' => 'Integer',
'default' => '',
'add' => '4.1',
'group' => 'multisite',
'name' => 'uniq_email_per_site',
'type' => 'Integer',
+ 'title' => 'Unique Email per Domain?',
'default' => '',
'add' => '4.1',
'is_domain' => 1,
'description' => 'The maximum number of contacts to show at a time when typing in an autocomplete field.',
'help_text' => '',
),
+ 'enable_innodb_fts' => array(
+ 'group_name' => 'Search Preferences',
+ 'group' => 'Search Preferences',
+ 'name' => 'enable_innodb_fts',
+ 'prefetch' => 0,
+ 'type' => 'Boolean',
+ 'quick_form_type' => 'YesNo',
+ 'default' => 0,
+ 'add' => '4.4',
+ 'title' => 'InnoDB Full Text Search',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => 'Enable InnoDB full-text search optimizations. (Requires MySQL 5.6+)',
+ 'help_text' => '',
+ 'on_change' => array(
+ '0' => array(
+ '0' => 'CRM_Core_InnoDBIndexer',
+ '1' => 'onToggleFts',
+ ),
+ ),
+ ),
+ 'fts_query_mode' => array(
+ 'group_name' => 'Search Preferences',
+ 'group' => 'Search Preferences',
+ 'name' => 'fts_query_mode',
+ 'prefetch' => 0,
+ 'type' => 'String',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'Text',
+ 'html_attributes' => array(
+ 'size' => 64,
+ 'maxlength' => 64,
+ ),
+ 'default' => 'simple',
+ 'add' => '4.5',
+ 'title' => 'How to handle full-tet queries',
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'description' => '',
+ 'help_text' => '',
+ ),
'userFrameworkResourceURL' => array(
'group' => 'url',
'group_name' => 'URL Preferences',
'name' => 'userFrameworkResourceURL',
+ 'title' => 'Script and CSS Resources URL',
'type' => 'String',
'default' => '',
'add' => '4.1',
'imageUploadURL' => array(
'group' => 'url',
'group_name' => 'URL Preferences',
+ 'title' => 'Image URL Prefix',
'name' => 'imageUploadURL',
'type' => 'String',
'default' => '',
'group' => 'url',
'group_name' => 'URL Preferences',
'name' => 'customCSSURL',
+ 'title' => 'Custom CSS',
'type' => 'String',
'default' => '',
'add' => '4.1',
'1' => array(
'id' => '1',
'title' => 'survey title',
- 'activity_type_id' => '35',
+ 'activity_type_id' => '30',
'instructions' => 'Call people, ask for money',
'max_number_of_contacts' => '12',
'is_active' => '1',
function survey_create_example(){
$params = array(
'title' => 'survey title',
- 'activity_type_id' => '35',
+ 'activity_type_id' => '30',
'max_number_of_contacts' => 12,
'instructions' => 'Call people, ask for money',
);
'id' => '1',
'title' => 'survey title',
'campaign_id' => '',
- 'activity_type_id' => '35',
+ 'activity_type_id' => '30',
'recontact_interval' => '',
'instructions' => 'Call people, ask for money',
'release_frequency' => '',
function survey_get_example(){
$params = array(
'title' => 'survey title',
- 'activity_type_id' => '35',
+ 'activity_type_id' => '30',
'max_number_of_contacts' => 12,
'instructions' => 'Call people, ask for money',
);
'1' => array(
'id' => '1',
'title' => 'survey title',
- 'activity_type_id' => '35',
+ 'activity_type_id' => '30',
'instructions' => 'Call people, ask for money',
'max_number_of_contacts' => '12',
'is_active' => '1',
<?php
/**
- * Test Generated example of using survey_respondent get API
+ * Test Generated example of using survey_respondant get API
* *
*/
function survey_respondant_get_example(){
--- /dev/null
+<?php
+/**
+ * Test Generated example of using tag getlist API
+ * Demonstrates use of api.getlist for autocomplete and quicksearch applications *
+ */
+function tag_getlist_example(){
+$params = array(
+ 'input' => 'New Tag3',
+ 'extra' => array(
+ '0' => 'used_for',
+ ),
+);
+
+try{
+ $result = civicrm_api3('tag', 'getlist', $params);
+}
+catch (CiviCRM_API3_Exception $e) {
+ // handle error here
+ $errorMessage = $e->getMessage();
+ $errorCode = $e->getErrorCode();
+ $errorData = $e->getExtraParams();
+ return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
+}
+
+return $result;
+}
+
+/**
+ * Function returns array of result expected from previous function
+ */
+function tag_getlist_expectedresult(){
+
+ $expectedResult = array(
+ 'is_error' => 0,
+ 'version' => 3,
+ 'count' => 1,
+ 'id' => 0,
+ 'values' => array(
+ '0' => array(
+ 'id' => '19',
+ 'label' => 'New Tag3',
+ 'description' => array(
+ '0' => 'This is description for Our New Tag ',
+ ),
+ 'extra' => array(
+ 'used_for' => 'civicrm_contact',
+ ),
+ ),
+ ),
+ 'page_num' => 1,
+ 'more_results' => '',
+);
+
+ return $expectedResult;
+}
+
+
+/*
+* This example has been generated from the API test suite. The test that created it is called
+*
+* testTagGetList and can be found in
+* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TagTest.php
+*
+* You can see the outcome of the API tests at
+* https://test.civicrm.org/job/CiviCRM-master-git/
+*
+* To Learn about the API read
+* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
+*
+* Browse the api on your own site with the api explorer
+* http://MYSITE.ORG/path/to/civicrm/api/explorer
+*
+* Read more about testing here
+* http://wiki.civicrm.org/confluence/display/CRM/Testing
+*
+* API Standards documentation:
+* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
+*/
'id' => array(
'name' => 'id',
'type' => 1,
+ 'title' => 'Tag ID',
'required' => true,
'api.aliases' => array(
'0' => 'tag',
'name' => array(
'name' => 'name',
'type' => 2,
- 'title' => 'Name',
+ 'title' => 'Tag Name',
'required' => true,
'maxlength' => 64,
'size' => 30,
'parent_id' => array(
'name' => 'parent_id',
'type' => 1,
+ 'title' => 'Parent Tag',
'default' => 'NULL',
'FKClassName' => 'CRM_Core_DAO_Tag',
),
'is_selectable' => array(
'name' => 'is_selectable',
'type' => 16,
+ 'title' => 'Display Tag?',
'default' => '1',
),
'is_reserved' => array(
'name' => 'is_reserved',
'type' => 16,
+ 'title' => 'Reserved',
),
'is_tagset' => array(
'name' => 'is_tagset',
'type' => 16,
+ 'title' => 'Tagset',
),
'used_for' => array(
'name' => 'used_for',
'maxlength' => 64,
'size' => 30,
'default' => 'NULL',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
+ 'pseudoconstant' => array(
+ 'optionGroupName' => 'tag_used_for',
+ ),
'api.default' => 'civicrm_contact',
),
'created_id' => array(
'name' => 'created_id',
'type' => 1,
+ 'title' => 'Tag Created By',
'FKClassName' => 'CRM_Contact_DAO_Contact',
),
'created_date' => array(
'is_searchable' => '1',
'location_type_id' => '1',
'phone_type_id' => '1',
+ 'website_type_id' => '',
'label' => 'Test Phone',
'field_type' => 'Contact',
'is_reserved' => '',
'is_searchable' => '1',
'location_type_id' => '',
'phone_type_id' => '',
+ 'website_type_id' => '',
'label' => 'Test First Name',
'field_type' => 'Contact',
'is_reserved' => '',
'is_searchable' => '1',
'location_type_id' => '1',
'phone_type_id' => '',
+ 'website_type_id' => '',
'label' => 'Test Country',
'field_type' => 'Contact',
'is_reserved' => '',
'is_searchable' => '1',
'location_type_id' => '1',
'phone_type_id' => '1',
+ 'website_type_id' => '',
'label' => 'Test Phone',
'field_type' => 'Contact',
'is_reserved' => '',
'headerPattern' => '/Website/i',
'dataPattern' => '/^[A-Za-z][0-9A-Za-z]{20,}$/',
'export' => true,
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'website_type_id' => array(
'name' => 'website_type_id',
'type' => 1,
'title' => 'Website Type',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'website_type',
),
'headerPattern' => '/Website/i',
'dataPattern' => '/^[A-Za-z][0-9A-Za-z]{20,}$/',
'export' => '1',
+ 'html' => array(
+ 'type' => 'Text',
+ ),
),
'website_type_id' => array(
'name' => 'website_type_id',
'type' => '1',
'title' => 'Website Type',
+ 'html' => array(
+ 'type' => 'Select',
+ ),
'pseudoconstant' => array(
'optionGroupName' => 'website_type',
),