From 89bf81b443c470849323a82a9992e4aee822a229 Mon Sep 17 00:00:00 2001 From: eileenmcnaughton Date: Sun, 28 Sep 2014 23:53:19 +0000 Subject: [PATCH] updated examples --- .../Activity/ContactRefCustomField.php | 4 +- .../Activity/ContactRefCustomFieldGet.php | 6 +- api/v3/examples/Activity/Create.php | 4 +- api/v3/examples/Activity/DateTimeHigh.php | 2 +- api/v3/examples/Activity/DateTimeLow.php | 2 +- api/v3/examples/Activity/Delete.php | 61 +++++++ api/v3/examples/Activity/Get.php | 4 +- api/v3/examples/Activity/Getfields.php | 58 +++++- .../Activity/ReturnAssigneeContact.php | 5 +- api/v3/examples/ActivityContact/Create.php | 71 ++++++++ api/v3/examples/ActivityContact/Delete.php | 61 +++++++ api/v3/examples/ActivityType/Create.php | 8 +- api/v3/examples/ActivityType/Get.php | 5 +- api/v3/examples/Case/Create.php | 10 +- api/v3/examples/Contact/APIChainedArray.php | 5 +- .../Contact/APIChainedArrayFormats.php | 3 + .../Contact/APIChainedArrayMultipleCustom.php | 3 + ...IChainedArrayValuesFromSiblingFunction.php | 2 + api/v3/examples/Contact/ChainTwoWebsites.php | 4 +- .../Contact/ChainTwoWebsitesSyntax2.php | 4 +- api/v3/examples/Contact/Create.php | 2 + api/v3/examples/Contact/Get.php | 3 + api/v3/examples/Contact/GetFieldsOptions.php | 166 +++++++++++++++++- api/v3/examples/Contact/GetSingleContact.php | 3 + .../Contact/GroupFilterUsingContactAPI.php | 3 + .../ContributionCreateWithNote.php | 2 - .../ContributionCreateWithSoftCredit.php | 10 +- .../CreateWithNestedLineItems.php | 4 +- api/v3/examples/Contribution/Get.php | 2 +- api/v3/examples/ContributionPage/Create.php | 11 +- api/v3/examples/ContributionPage/Delete.php | 2 +- api/v3/examples/ContributionPage/Get.php | 9 +- api/v3/examples/ContributionPage/Submit.php | 77 ++++++++ api/v3/examples/ContributionSoft/Create.php | 2 + api/v3/examples/ContributionSoft/Get.php | 1 + api/v3/examples/Country/Create.php | 76 ++++++++ api/v3/examples/Country/Delete.php | 61 +++++++ api/v3/examples/Country/Get.php | 70 ++++++++ api/v3/examples/CustomField/Create.php | 1 + api/v3/examples/Domain/Get.php | 4 +- api/v3/examples/Email/NestedReplaceEmail.php | 3 + api/v3/examples/Event/Create.php | 2 + api/v3/examples/Event/Get.php | 1 + api/v3/examples/Event/IsCurrentOption.php | 1 + api/v3/examples/Event/IsFullOption.php | 3 +- api/v3/examples/Grant/Delete.php | 2 +- api/v3/examples/Grant/Get.php | 8 +- api/v3/examples/Group/Get.php | 7 - api/v3/examples/Group/getfields.php | 20 ++- api/v3/examples/GroupContact/Delete.php | 8 +- .../examples/GroupContact/GetWithGroupID.php | 14 -- api/v3/examples/Job/Delete.php | 7 +- api/v3/examples/LineItem/Create.php | 1 + api/v3/examples/LineItem/Get.php | 1 + api/v3/examples/LocBlock/createEntities.php | 14 +- api/v3/examples/LocBlock/getEntities.php | 14 +- api/v3/examples/LocBlock/simpleCreate.php | 14 +- .../MailSettings/ChainedGetDelete.php | 8 +- api/v3/examples/MailSettings/Create.php | 3 +- api/v3/examples/MailSettings/Delete.php | 2 +- api/v3/examples/MailSettings/Get.php | 9 +- api/v3/examples/Mailing/Create.php | 125 +++++++++++++ api/v3/examples/Mailing/Delete.php | 61 +++++++ api/v3/examples/Membership/Create.php | 12 +- api/v3/examples/Membership/Get.php | 2 +- api/v3/examples/Membership/Update.php | 12 +- .../examples/Membership/filterIsCurrent.php | 4 +- api/v3/examples/MembershipType/Create.php | 2 +- api/v3/examples/MembershipType/Get.php | 2 +- api/v3/examples/MessageTemplate/Create.php | 20 +-- api/v3/examples/MessageTemplate/Get.php | 22 +-- api/v3/examples/OptionGroup/Create.php | 7 +- api/v3/examples/OptionGroup/Delete.php | 2 +- api/v3/examples/OptionGroup/Get.php | 1 + .../Participant/CreateParticipantPayment.php | 6 +- api/v3/examples/Participant/Get.php | 1 + api/v3/examples/Participant/NestedDelete.php | 6 +- .../examples/Participant/NestedEventGet.php | 2 + .../examples/ParticipantStatusType/Create.php | 8 +- .../examples/ParticipantStatusType/Delete.php | 2 +- api/v3/examples/ParticipantStatusType/Get.php | 8 +- api/v3/examples/Pledge/Create.php | 8 +- api/v3/examples/Pledge/Get.php | 4 +- api/v3/examples/Pledge/GetFilterHighDate.php | 4 +- api/v3/examples/PriceSet/Delete.php | 2 +- api/v3/examples/Profile/Apply.php | 4 +- api/v3/examples/Profile/Get.php | 6 +- api/v3/examples/Profile/GetFields.php | 19 +- api/v3/examples/Profile/Submit.php | 12 +- api/v3/examples/ReportTemplate/Getrows.php | 9 - api/v3/examples/Setting/GetFields.php | 159 +++++++++++++---- api/v3/examples/Survey/ChainedGetDelete.php | 2 +- api/v3/examples/Survey/Create.php | 4 +- api/v3/examples/Survey/Get.php | 4 +- api/v3/examples/SurveyRespondant/Get.php | 2 +- api/v3/examples/Tag/GetList.php | 78 ++++++++ api/v3/examples/Tag/Getfields.php | 14 +- api/v3/examples/UFField/Create.php | 1 + api/v3/examples/UFField/Replace.php | 3 + api/v3/examples/Website/GetFields.php | 6 + api/v3/examples/Website/GetWithMetadata.php | 6 + 101 files changed, 1380 insertions(+), 245 deletions(-) create mode 100644 api/v3/examples/Activity/Delete.php create mode 100644 api/v3/examples/ActivityContact/Create.php create mode 100644 api/v3/examples/ActivityContact/Delete.php create mode 100644 api/v3/examples/ContributionPage/Submit.php create mode 100644 api/v3/examples/Country/Create.php create mode 100644 api/v3/examples/Country/Delete.php create mode 100644 api/v3/examples/Country/Get.php create mode 100644 api/v3/examples/Mailing/Create.php create mode 100644 api/v3/examples/Mailing/Delete.php create mode 100644 api/v3/examples/Tag/GetList.php diff --git a/api/v3/examples/Activity/ContactRefCustomField.php b/api/v3/examples/Activity/ContactRefCustomField.php index 91e13e1b8f..59aecdce51 100644 --- a/api/v3/examples/Activity/ContactRefCustomField.php +++ b/api/v3/examples/Activity/ContactRefCustomField.php @@ -6,7 +6,7 @@ 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, @@ -45,7 +45,7 @@ function activity_create_expectedresult(){ '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', diff --git a/api/v3/examples/Activity/ContactRefCustomFieldGet.php b/api/v3/examples/Activity/ContactRefCustomFieldGet.php index 2ecd6bccf1..cdd214c6f7 100644 --- a/api/v3/examples/Activity/ContactRefCustomFieldGet.php +++ b/api/v3/examples/Activity/ContactRefCustomFieldGet.php @@ -36,7 +36,7 @@ function activity_get_expectedresult(){ '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', @@ -51,10 +51,10 @@ function activity_get_expectedresult(){ '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', ), ), ); diff --git a/api/v3/examples/Activity/Create.php b/api/v3/examples/Activity/Create.php index 72d04883ba..b8fffb7e7c 100644 --- a/api/v3/examples/Activity/Create.php +++ b/api/v3/examples/Activity/Create.php @@ -6,7 +6,7 @@ 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, @@ -45,7 +45,7 @@ function activity_create_expectedresult(){ '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', diff --git a/api/v3/examples/Activity/DateTimeHigh.php b/api/v3/examples/Activity/DateTimeHigh.php index f31c76d95f..906dbd6169 100644 --- a/api/v3/examples/Activity/DateTimeHigh.php +++ b/api/v3/examples/Activity/DateTimeHigh.php @@ -37,7 +37,7 @@ function activity_get_expectedresult(){ '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', diff --git a/api/v3/examples/Activity/DateTimeLow.php b/api/v3/examples/Activity/DateTimeLow.php index 9032908788..6e40ca7db0 100644 --- a/api/v3/examples/Activity/DateTimeLow.php +++ b/api/v3/examples/Activity/DateTimeLow.php @@ -36,7 +36,7 @@ function activity_get_expectedresult(){ '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', diff --git a/api/v3/examples/Activity/Delete.php b/api/v3/examples/Activity/Delete.php new file mode 100644 index 0000000000..e6b3779ebe --- /dev/null +++ b/api/v3/examples/Activity/Delete.php @@ -0,0 +1,61 @@ + 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 +*/ diff --git a/api/v3/examples/Activity/Get.php b/api/v3/examples/Activity/Get.php index ea6fe81f8f..b56306c981 100644 --- a/api/v3/examples/Activity/Get.php +++ b/api/v3/examples/Activity/Get.php @@ -6,7 +6,7 @@ function activity_get_example(){ $params = array( 'contact_id' => 1, - 'activity_type_id' => '46', + 'activity_type_id' => '49', 'sequential' => 1, 'return.custom_1' => 1, ); @@ -39,7 +39,7 @@ function activity_get_expectedresult(){ '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', diff --git a/api/v3/examples/Activity/Getfields.php b/api/v3/examples/Activity/Getfields.php index f8957925b3..74243d755a 100644 --- a/api/v3/examples/Activity/Getfields.php +++ b/api/v3/examples/Activity/Getfields.php @@ -40,12 +40,15 @@ function activity_getfields_expectedresult(){ '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', ), @@ -58,12 +61,18 @@ function activity_getfields_expectedresult(){ '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', @@ -71,11 +80,17 @@ function activity_getfields_expectedresult(){ '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', ), @@ -107,6 +122,9 @@ function activity_getfields_expectedresult(){ 'headerPattern' => '/(is.)?(current.)?(revision|version(ing)?)/i', 'export' => true, 'default' => '1', + 'html' => array( + 'type' => 'CheckBox', + ), ), 'original_id' => array( 'name' => 'original_id', @@ -118,6 +136,9 @@ function activity_getfields_expectedresult(){ 'name' => 'weight', 'type' => 1, 'title' => 'Weight', + 'html' => array( + 'type' => 'Text', + ), ), 'id' => array( 'name' => 'id', @@ -142,6 +163,9 @@ function activity_getfields_expectedresult(){ 'where' => 'civicrm_activity.subject', 'headerPattern' => '/(activity.)?subject/i', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), 'uniqueName' => 'activity_subject', ), 'duration' => array( @@ -152,6 +176,9 @@ function activity_getfields_expectedresult(){ 'where' => 'civicrm_activity.duration', 'headerPattern' => '/(activity.)?duration(s)?$/i', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), 'uniqueName' => 'activity_duration', ), 'location' => array( @@ -164,6 +191,9 @@ function activity_getfields_expectedresult(){ 'where' => 'civicrm_activity.location', 'headerPattern' => '/(activity.)?location$/i', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), 'uniqueName' => 'activity_location', ), 'details' => array( @@ -176,15 +206,21 @@ function activity_getfields_expectedresult(){ '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', ), @@ -201,6 +237,9 @@ function activity_getfields_expectedresult(){ 'where' => 'civicrm_activity.is_test', 'headerPattern' => '/(is.)?test(.activity)?/i', 'export' => true, + 'html' => array( + 'type' => 'Select', + ), 'uniqueName' => 'activity_is_test', ), 'medium_id' => array( @@ -208,6 +247,9 @@ function activity_getfields_expectedresult(){ 'type' => 1, 'title' => 'Activity Medium', 'default' => 'NULL', + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'optionGroupName' => 'encounter_medium', ), @@ -219,6 +261,9 @@ function activity_getfields_expectedresult(){ 'title' => 'Result', 'maxlength' => 255, 'size' => 45, + 'html' => array( + 'type' => 'Text', + ), 'uniqueName' => 'activity_result', ), 'is_deleted' => array( @@ -229,6 +274,9 @@ function activity_getfields_expectedresult(){ 'where' => 'civicrm_activity.is_deleted', 'headerPattern' => '/(activity.)?(trash|deleted)/i', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), 'uniqueName' => 'activity_is_deleted', ), 'campaign_id' => array( @@ -239,6 +287,9 @@ function activity_getfields_expectedresult(){ 'where' => 'civicrm_activity.campaign_id', 'export' => true, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', + 'html' => array( + 'type' => 'CheckBox', + ), 'pseudoconstant' => array( 'table' => 'civicrm_campaign', 'keyColumn' => 'id', @@ -253,6 +304,9 @@ function activity_getfields_expectedresult(){ 'import' => true, 'where' => 'civicrm_activity.engagement_level', 'export' => true, + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'optionGroupName' => 'engagement_index', ), diff --git a/api/v3/examples/Activity/ReturnAssigneeContact.php b/api/v3/examples/Activity/ReturnAssigneeContact.php index 31aee3161c..60950c3c74 100644 --- a/api/v3/examples/Activity/ReturnAssigneeContact.php +++ b/api/v3/examples/Activity/ReturnAssigneeContact.php @@ -40,7 +40,7 @@ function activity_get_expectedresult(){ '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', @@ -87,6 +87,8 @@ function activity_get_expectedresult(){ 'last_name' => 'Anderson', 'prefix_id' => '3', 'suffix_id' => '3', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -121,6 +123,7 @@ function activity_get_expectedresult(){ 'world_region' => '', 'individual_prefix' => 'Mr.', 'individual_suffix' => 'II', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/ActivityContact/Create.php b/api/v3/examples/ActivityContact/Create.php new file mode 100644 index 0000000000..2919adb3b1 --- /dev/null +++ b/api/v3/examples/ActivityContact/Create.php @@ -0,0 +1,71 @@ + 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 +*/ diff --git a/api/v3/examples/ActivityContact/Delete.php b/api/v3/examples/ActivityContact/Delete.php new file mode 100644 index 0000000000..f9783f4939 --- /dev/null +++ b/api/v3/examples/ActivityContact/Delete.php @@ -0,0 +1,61 @@ + 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 +*/ diff --git a/api/v3/examples/ActivityType/Create.php b/api/v3/examples/ActivityType/Create.php index 939f94053a..ca223a613d 100644 --- a/api/v3/examples/ActivityType/Create.php +++ b/api/v3/examples/ActivityType/Create.php @@ -36,13 +36,13 @@ function activity_type_create_expectedresult(){ '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, diff --git a/api/v3/examples/ActivityType/Get.php b/api/v3/examples/ActivityType/Get.php index 1be34af905..7bbfc2d4a2 100644 --- a/api/v3/examples/ActivityType/Get.php +++ b/api/v3/examples/ActivityType/Get.php @@ -28,7 +28,7 @@ function activity_type_get_expectedresult(){ $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 45, + 'count' => 48, 'values' => array( '1' => 'Meeting', '2' => 'Phone Call', @@ -75,6 +75,9 @@ function activity_type_get_expectedresult(){ '43' => 'Edit Batch', '44' => 'SMS delivery', '45' => 'Inbound SMS', + '46' => 'Payment', + '47' => 'Refund', + '48' => 'Change Registration', ), ); diff --git a/api/v3/examples/Case/Create.php b/api/v3/examples/Case/Create.php index 9397a33c87..b7327d0dd5 100644 --- a/api/v3/examples/Case/Create.php +++ b/api/v3/examples/Case/Create.php @@ -7,7 +7,7 @@ function case_create_example(){ $params = array( 'subject' => 'Test case', 'contact_id' => 17, - 'case_type' => 'Housing Support', + 'case_type' => 'housing_support', ); try{ @@ -33,11 +33,11 @@ function case_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Contact/APIChainedArray.php b/api/v3/examples/Contact/APIChainedArray.php index c8192438ad..697d93470d 100644 --- a/api/v3/examples/Contact/APIChainedArray.php +++ b/api/v3/examples/Contact/APIChainedArray.php @@ -64,6 +64,8 @@ function contact_get_expectedresult(){ 'last_name' => 'xyz3', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -98,6 +100,7 @@ function contact_get_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -150,7 +153,7 @@ function contact_get_expectedresult(){ 'contribution_campaign_id' => '', 'financial_type_id' => '1', 'financial_type' => 'Donation', - 'instrument_id' => '81', + 'instrument_id' => '84', 'payment_instrument' => 'Credit Card', 'product_id' => '', 'product_name' => '', diff --git a/api/v3/examples/Contact/APIChainedArrayFormats.php b/api/v3/examples/Contact/APIChainedArrayFormats.php index a29e0bb2a7..98e8d34e26 100644 --- a/api/v3/examples/Contact/APIChainedArrayFormats.php +++ b/api/v3/examples/Contact/APIChainedArrayFormats.php @@ -66,6 +66,8 @@ function contact_get_expectedresult(){ 'last_name' => 'xyz3', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -100,6 +102,7 @@ function contact_get_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php index 0f1f798527..c6e1c4b194 100644 --- a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php +++ b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php @@ -63,6 +63,8 @@ function contact_get_expectedresult(){ 'last_name' => 'xyz3', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -97,6 +99,7 @@ function contact_get_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php index 98d5eb98f6..88f03c4624 100644 --- a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php +++ b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php @@ -70,6 +70,8 @@ function contact_create_expectedresult(){ 'last_name' => '', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', diff --git a/api/v3/examples/Contact/ChainTwoWebsites.php b/api/v3/examples/Contact/ChainTwoWebsites.php index e80068fba3..422aedeee6 100644 --- a/api/v3/examples/Contact/ChainTwoWebsites.php +++ b/api/v3/examples/Contact/ChainTwoWebsites.php @@ -82,6 +82,8 @@ function contact_create_expectedresult(){ 'last_name' => 'xyz3', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -130,11 +132,9 @@ function contact_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php index 5e3955192e..34690ede4d 100644 --- a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php +++ b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php @@ -85,6 +85,8 @@ function contact_create_expectedresult(){ 'last_name' => 'xyz3', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', @@ -133,11 +135,9 @@ function contact_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Contact/Create.php b/api/v3/examples/Contact/Create.php index 156fc36799..3eeb35b611 100644 --- a/api/v3/examples/Contact/Create.php +++ b/api/v3/examples/Contact/Create.php @@ -63,6 +63,8 @@ function contact_create_expectedresult(){ 'last_name' => 'xyz1', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', diff --git a/api/v3/examples/Contact/Get.php b/api/v3/examples/Contact/Get.php index aef472d508..13e368caa0 100644 --- a/api/v3/examples/Contact/Get.php +++ b/api/v3/examples/Contact/Get.php @@ -58,6 +58,8 @@ function contact_get_expectedresult(){ 'last_name' => '', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -92,6 +94,7 @@ function contact_get_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/Contact/GetFieldsOptions.php b/api/v3/examples/Contact/GetFieldsOptions.php index 0064ac6cc4..36309b48a0 100644 --- a/api/v3/examples/Contact/GetFieldsOptions.php +++ b/api/v3/examples/Contact/GetFieldsOptions.php @@ -33,7 +33,7 @@ function contact_getfields_expectedresult(){ $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 53, + 'count' => 55, 'values' => array( 'id' => array( 'name' => 'id', @@ -56,6 +56,9 @@ function contact_getfields_expectedresult(){ 'size' => 30, 'export' => true, 'where' => 'civicrm_contact.contact_type', + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'table' => 'civicrm_contact_type', 'keyColumn' => 'name', @@ -74,6 +77,9 @@ function contact_getfields_expectedresult(){ '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', @@ -90,6 +96,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/d(o )?(not )?(email)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => true, + 'html' => array( + 'type' => 'CheckBox', + ), ), 'do_not_phone' => array( 'name' => 'do_not_phone', @@ -100,6 +109,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/d(o )?(not )?(call|phone)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => true, + 'html' => array( + 'type' => 'CheckBox', + ), ), 'do_not_mail' => array( 'name' => 'do_not_mail', @@ -110,6 +122,9 @@ function contact_getfields_expectedresult(){ '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', @@ -120,6 +135,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/d(o )?(not )?(sms)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => true, + 'html' => array( + 'type' => 'CheckBox', + ), ), 'do_not_trade' => array( 'name' => 'do_not_trade', @@ -130,6 +148,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/d(o )?(not )?(trade)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => true, + 'html' => array( + 'type' => 'CheckBox', + ), ), 'is_opt_out' => array( 'name' => 'is_opt_out', @@ -139,6 +160,9 @@ function contact_getfields_expectedresult(){ 'import' => true, 'where' => 'civicrm_contact.is_opt_out', 'export' => true, + 'html' => array( + 'type' => 'CheckBox', + ), ), 'legal_identifier' => array( 'name' => 'legal_identifier', @@ -151,6 +175,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/legal\\s?id/i', 'dataPattern' => '/\\w+?\\d{5,}/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'external_identifier' => array( 'name' => 'external_identifier', @@ -163,6 +190,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/external\\s?id/i', 'dataPattern' => '/^\\d{11,}$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'sort_name' => array( 'name' => 'sort_name', @@ -172,6 +202,9 @@ function contact_getfields_expectedresult(){ 'size' => 30, 'export' => true, 'where' => 'civicrm_contact.sort_name', + 'html' => array( + 'type' => 'Text', + ), ), 'display_name' => array( 'name' => 'display_name', @@ -181,6 +214,9 @@ function contact_getfields_expectedresult(){ 'size' => 30, 'export' => true, 'where' => 'civicrm_contact.display_name', + 'html' => array( + 'type' => 'Text', + ), ), 'nick_name' => array( 'name' => 'nick_name', @@ -193,6 +229,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/n(ick\\s)name|nick$/i', 'dataPattern' => '/^\\w+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'legal_name' => array( 'name' => 'legal_name', @@ -204,6 +243,9 @@ function contact_getfields_expectedresult(){ 'where' => 'civicrm_contact.legal_name', 'headerPattern' => '/^legal|(l(egal\\s)?name)$/i', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'image_URL' => array( 'name' => 'image_URL', @@ -214,6 +256,9 @@ function contact_getfields_expectedresult(){ 'import' => true, 'where' => 'civicrm_contact.image_URL', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'preferred_communication_method' => array( 'name' => 'preferred_communication_method', @@ -226,6 +271,9 @@ function contact_getfields_expectedresult(){ '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', ), @@ -240,6 +288,9 @@ function contact_getfields_expectedresult(){ 'where' => 'civicrm_contact.preferred_language', 'headerPattern' => '/^lang/i', 'export' => true, + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'optionGroupName' => 'languages', 'keyColumn' => 'name', @@ -249,12 +300,19 @@ function contact_getfields_expectedresult(){ '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', @@ -283,6 +341,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^first|(f(irst\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'middle_name' => array( 'name' => 'middle_name', @@ -295,6 +356,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^middle|(m(iddle\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'last_name' => array( 'name' => 'last_name', @@ -307,6 +371,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^last|(l(ast\\s)?name)$/i', 'dataPattern' => '/^\\w+(\\s\\w+)?+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'prefix_id' => array( 'name' => 'prefix_id', @@ -317,6 +384,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^(prefix|title)/i', 'dataPattern' => '/^(mr|ms|mrs|sir|dr)\\.?$/i', 'export' => true, + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'optionGroupName' => 'individual_prefix', ), @@ -334,6 +404,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^suffix$/i', 'dataPattern' => '/^(sr|jr)\\.?|i{2,}$/', 'export' => true, + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'optionGroupName' => 'individual_suffix', ), @@ -342,6 +415,27 @@ function contact_getfields_expectedresult(){ '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, @@ -355,6 +449,9 @@ function contact_getfields_expectedresult(){ 'size' => 45, 'import' => true, 'where' => 'civicrm_contact.email_greeting_custom', + 'html' => array( + 'type' => 'Text', + ), ), 'email_greeting_display' => array( 'name' => 'email_greeting_display', @@ -362,11 +459,17 @@ function contact_getfields_expectedresult(){ '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', @@ -376,6 +479,9 @@ function contact_getfields_expectedresult(){ 'size' => 45, 'import' => true, 'where' => 'civicrm_contact.postal_greeting_custom', + 'html' => array( + 'type' => 'Text', + ), ), 'postal_greeting_display' => array( 'name' => 'postal_greeting_display', @@ -383,6 +489,9 @@ function contact_getfields_expectedresult(){ 'title' => 'Postal Greeting', 'maxlength' => 255, 'size' => 45, + 'html' => array( + 'type' => 'Text', + ), ), 'addressee_id' => array( 'name' => 'addressee_id', @@ -397,6 +506,9 @@ function contact_getfields_expectedresult(){ 'size' => 45, 'import' => true, 'where' => 'civicrm_contact.addressee_custom', + 'html' => array( + 'type' => 'Text', + ), ), 'addressee_display' => array( 'name' => 'addressee_display', @@ -404,6 +516,9 @@ function contact_getfields_expectedresult(){ 'title' => 'Addressee', 'maxlength' => 255, 'size' => 45, + 'html' => array( + 'type' => 'Text', + ), ), 'job_title' => array( 'name' => 'job_title', @@ -416,6 +531,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^job|(j(ob\\s)?title)$/i', 'dataPattern' => '//', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'gender_id' => array( 'name' => 'gender_id', @@ -425,6 +543,9 @@ function contact_getfields_expectedresult(){ 'where' => 'civicrm_contact.gender_id', 'headerPattern' => '/^gender$/i', 'export' => true, + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'optionGroupName' => 'gender', ), @@ -438,6 +559,9 @@ function contact_getfields_expectedresult(){ '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', @@ -447,6 +571,9 @@ function contact_getfields_expectedresult(){ 'where' => 'civicrm_contact.is_deceased', 'headerPattern' => '/i(s\\s)?d(eceased)$/i', 'export' => true, + 'html' => array( + 'type' => 'CheckBox', + ), ), 'deceased_date' => array( 'name' => 'deceased_date', @@ -456,6 +583,9 @@ function contact_getfields_expectedresult(){ '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', @@ -468,12 +598,18 @@ function contact_getfields_expectedresult(){ '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', @@ -486,6 +622,9 @@ function contact_getfields_expectedresult(){ 'headerPattern' => '/^organization|(o(rganization\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), ), 'sic_code' => array( 'name' => 'sic_code', @@ -497,6 +636,9 @@ function contact_getfields_expectedresult(){ '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', @@ -510,12 +652,17 @@ function contact_getfields_expectedresult(){ '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( @@ -523,6 +670,8 @@ function contact_getfields_expectedresult(){ 'type' => 256, 'title' => 'Modified Date', 'required' => '', + 'export' => true, + 'where' => 'civicrm_contact.modified_date', 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', ), 'source' => array( @@ -535,6 +684,9 @@ function contact_getfields_expectedresult(){ '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( @@ -544,6 +696,9 @@ function contact_getfields_expectedresult(){ 'export' => true, 'where' => 'civicrm_contact.employer_id', 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'html' => array( + 'type' => 'Autocomplete-Select', + ), 'uniqueName' => 'current_employer_id', ), 'is_deleted' => array( @@ -553,6 +708,9 @@ function contact_getfields_expectedresult(){ 'required' => true, 'export' => true, 'where' => 'civicrm_contact.is_deleted', + 'html' => array( + 'type' => 'CheckBox', + ), 'uniqueName' => 'contact_is_deleted', ), 'custom_1' => array( @@ -570,10 +728,12 @@ function contact_getfields_expectedresult(){ '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', diff --git a/api/v3/examples/Contact/GetSingleContact.php b/api/v3/examples/Contact/GetSingleContact.php index d0d1f09b1e..c2fa77de64 100644 --- a/api/v3/examples/Contact/GetSingleContact.php +++ b/api/v3/examples/Contact/GetSingleContact.php @@ -54,6 +54,8 @@ function contact_getsingle_expectedresult(){ 'last_name' => 'Contact', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -88,6 +90,7 @@ function contact_getsingle_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php index da32f8f530..7099c96631 100644 --- a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php +++ b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php @@ -62,6 +62,8 @@ function contact_get_expectedresult(){ 'last_name' => '', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -96,6 +98,7 @@ function contact_get_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/Contribution/ContributionCreateWithNote.php b/api/v3/examples/Contribution/ContributionCreateWithNote.php index 9e621e7084..e85bdc5500 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithNote.php +++ b/api/v3/examples/Contribution/ContributionCreateWithNote.php @@ -66,11 +66,9 @@ function contribution_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php index b020e08d19..2dcad4cec1 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php @@ -14,7 +14,13 @@ $params = array( '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{ @@ -63,11 +69,9 @@ function contribution_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Contribution/CreateWithNestedLineItems.php b/api/v3/examples/Contribution/CreateWithNestedLineItems.php index 04e5644e78..af043ea3ab 100644 --- a/api/v3/examples/Contribution/CreateWithNestedLineItems.php +++ b/api/v3/examples/Contribution/CreateWithNestedLineItems.php @@ -80,11 +80,9 @@ function contribution_create_expectedresult(){ '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' => '', @@ -100,6 +98,7 @@ function contribution_create_expectedresult(){ 'id' => '1', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', + 'contribution_id' => '1', 'price_field_id' => '1', 'label' => 'line item', 'qty' => '2', @@ -122,6 +121,7 @@ function contribution_create_expectedresult(){ 'id' => '2', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', + 'contribution_id' => '1', 'price_field_id' => '1', 'label' => 'line item', 'qty' => '1', diff --git a/api/v3/examples/Contribution/Get.php b/api/v3/examples/Contribution/Get.php index d53cb686c0..4636716e0b 100644 --- a/api/v3/examples/Contribution/Get.php +++ b/api/v3/examples/Contribution/Get.php @@ -61,7 +61,7 @@ function contribution_get_expectedresult(){ 'contribution_campaign_id' => '', 'financial_type_id' => '1', 'financial_type' => 'Donation', - 'instrument_id' => '84', + 'instrument_id' => '87', 'payment_instrument' => 'Check', 'product_id' => '', 'product_name' => '', diff --git a/api/v3/examples/ContributionPage/Create.php b/api/v3/examples/ContributionPage/Create.php index 3d81974c64..f482d93fe9 100644 --- a/api/v3/examples/ContributionPage/Create.php +++ b/api/v3/examples/ContributionPage/Create.php @@ -9,6 +9,8 @@ $params = array( 'financial_type_id' => 1, 'currency' => 'NZD', 'goal_amount' => 34567, + 'is_pay_later' => 1, + 'is_monetary' => true, ); try{ @@ -43,13 +45,13 @@ function contribution_page_create_expectedresult(){ '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' => '', @@ -72,12 +74,9 @@ function contribution_page_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/ContributionPage/Delete.php b/api/v3/examples/ContributionPage/Delete.php index 71a3fe74fc..24ddce6520 100644 --- a/api/v3/examples/ContributionPage/Delete.php +++ b/api/v3/examples/ContributionPage/Delete.php @@ -5,7 +5,7 @@ */ function contribution_page_delete_example(){ $params = array( - 'id' => 4, + 'id' => 1, ); try{ diff --git a/api/v3/examples/ContributionPage/Get.php b/api/v3/examples/ContributionPage/Get.php index 3dd5f3b179..a4df262f4c 100644 --- a/api/v3/examples/ContributionPage/Get.php +++ b/api/v3/examples/ContributionPage/Get.php @@ -33,10 +33,10 @@ function contribution_page_get_expectedresult(){ '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, @@ -45,12 +45,13 @@ function contribution_page_get_expectedresult(){ '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', diff --git a/api/v3/examples/ContributionPage/Submit.php b/api/v3/examples/ContributionPage/Submit.php new file mode 100644 index 0000000000..0e6440e3d7 --- /dev/null +++ b/api/v3/examples/ContributionPage/Submit.php @@ -0,0 +1,77 @@ + '', + '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 +*/ diff --git a/api/v3/examples/ContributionSoft/Create.php b/api/v3/examples/ContributionSoft/Create.php index 185266bdcc..ff9f747718 100644 --- a/api/v3/examples/ContributionSoft/Create.php +++ b/api/v3/examples/ContributionSoft/Create.php @@ -9,6 +9,7 @@ $params = array( 'contact_id' => 2, 'amount' => '10', 'currency' => 'USD', + 'soft_credit_type_id' => 5, ); try{ @@ -46,6 +47,7 @@ function contribution_soft_create_expectedresult(){ 'pcp_display_in_roll' => '', 'pcp_roll_nickname' => '', 'pcp_personal_note' => '', + 'soft_credit_type_id' => '5', ), ), ); diff --git a/api/v3/examples/ContributionSoft/Get.php b/api/v3/examples/ContributionSoft/Get.php index ce3429449e..efad77eef3 100644 --- a/api/v3/examples/ContributionSoft/Get.php +++ b/api/v3/examples/ContributionSoft/Get.php @@ -40,6 +40,7 @@ function contribution_soft_get_expectedresult(){ 'amount' => '10.00', 'currency' => 'USD', 'pcp_display_in_roll' => 0, + 'soft_credit_type_id' => '4', ), ), ); diff --git a/api/v3/examples/Country/Create.php b/api/v3/examples/Country/Create.php new file mode 100644 index 0000000000..7789a17ac0 --- /dev/null +++ b/api/v3/examples/Country/Create.php @@ -0,0 +1,76 @@ + '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 +*/ diff --git a/api/v3/examples/Country/Delete.php b/api/v3/examples/Country/Delete.php new file mode 100644 index 0000000000..6080fa0f69 --- /dev/null +++ b/api/v3/examples/Country/Delete.php @@ -0,0 +1,61 @@ + 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 +*/ diff --git a/api/v3/examples/Country/Get.php b/api/v3/examples/Country/Get.php new file mode 100644 index 0000000000..ea03ca4ee6 --- /dev/null +++ b/api/v3/examples/Country/Get.php @@ -0,0 +1,70 @@ + '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 +*/ diff --git a/api/v3/examples/CustomField/Create.php b/api/v3/examples/CustomField/Create.php index 10f7760361..4a1b802475 100644 --- a/api/v3/examples/CustomField/Create.php +++ b/api/v3/examples/CustomField/Create.php @@ -72,6 +72,7 @@ function custom_field_create_expectedresult(){ 'column_name' => 'name1_1', 'option_group_id' => '', 'filter' => '', + 'in_selector' => 0, ), ), ); diff --git a/api/v3/examples/Domain/Get.php b/api/v3/examples/Domain/Get.php index 1568667579..efdb32100d 100644 --- a/api/v3/examples/Domain/Get.php +++ b/api/v3/examples/Domain/Get.php @@ -35,7 +35,7 @@ function domain_get_expectedresult(){ '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:{}}', @@ -61,7 +61,7 @@ function domain_get_expectedresult(){ '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\" ', diff --git a/api/v3/examples/Email/NestedReplaceEmail.php b/api/v3/examples/Email/NestedReplaceEmail.php index 7c1c17eb57..0c5299d411 100644 --- a/api/v3/examples/Email/NestedReplaceEmail.php +++ b/api/v3/examples/Email/NestedReplaceEmail.php @@ -87,6 +87,8 @@ function email_replace_expectedresult(){ 'last_name' => '', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -121,6 +123,7 @@ function email_replace_expectedresult(){ 'world_region' => '', 'individual_prefix' => '', 'individual_suffix' => '', + 'communication_style' => '', 'gender' => '', 'state_province_name' => '', 'state_province' => '', diff --git a/api/v3/examples/Event/Create.php b/api/v3/examples/Event/Create.php index 0d74e3130b..fb15e40699 100644 --- a/api/v3/examples/Event/Create.php +++ b/api/v3/examples/Event/Create.php @@ -109,8 +109,10 @@ function event_create_expectedresult(){ 'currency' => '', 'campaign_id' => '', 'is_share' => '', + 'is_confirm_enabled' => '', 'parent_event_id' => '', 'slot_label_id' => '', + 'dedupe_rule_group_id' => '', ), ), ); diff --git a/api/v3/examples/Event/Get.php b/api/v3/examples/Event/Get.php index 44ccba834a..a8aa0eb99f 100644 --- a/api/v3/examples/Event/Get.php +++ b/api/v3/examples/Event/Get.php @@ -57,6 +57,7 @@ function event_get_expectedresult(){ 'is_template' => 0, 'created_date' => '2013-07-28 08:49:19', 'is_share' => '1', + 'is_confirm_enabled' => '1', ), ), ); diff --git a/api/v3/examples/Event/IsCurrentOption.php b/api/v3/examples/Event/IsCurrentOption.php index 696b451d20..b1f3a15598 100644 --- a/api/v3/examples/Event/IsCurrentOption.php +++ b/api/v3/examples/Event/IsCurrentOption.php @@ -65,6 +65,7 @@ function event_get_expectedresult(){ 'is_template' => 0, 'created_date' => '2013-07-28 08:49:19', 'is_share' => '1', + 'is_confirm_enabled' => '1', ), ), ); diff --git a/api/v3/examples/Event/IsFullOption.php b/api/v3/examples/Event/IsFullOption.php index b12cddd3a2..bfa1cd0f7d 100644 --- a/api/v3/examples/Event/IsFullOption.php +++ b/api/v3/examples/Event/IsFullOption.php @@ -50,8 +50,9 @@ function event_getsingle_expectedresult(){ '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', ); diff --git a/api/v3/examples/Grant/Delete.php b/api/v3/examples/Grant/Delete.php index 85488c5674..7719a922f0 100644 --- a/api/v3/examples/Grant/Delete.php +++ b/api/v3/examples/Grant/Delete.php @@ -5,7 +5,7 @@ */ function grant_delete_example(){ $params = array( - 'id' => 3, + 'id' => 1, ); try{ diff --git a/api/v3/examples/Grant/Get.php b/api/v3/examples/Grant/Get.php index 8b4597cd4b..15fbbf2bd0 100644 --- a/api/v3/examples/Grant/Get.php +++ b/api/v3/examples/Grant/Get.php @@ -31,11 +31,11 @@ function grant_get_expectedresult(){ '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', diff --git a/api/v3/examples/Group/Get.php b/api/v3/examples/Group/Get.php index 10b10b28ed..b164e7311d 100644 --- a/api/v3/examples/Group/Get.php +++ b/api/v3/examples/Group/Get.php @@ -38,8 +38,6 @@ function group_get_expectedresult(){ '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\") ) ', @@ -49,13 +47,8 @@ function group_get_expectedresult(){ '0' => '1', '1' => '2', ), - 'cache_date' => '', - 'refresh_date' => '', - 'parents' => '', - 'children' => '', 'is_hidden' => 0, 'is_reserved' => 0, - 'created_id' => '', ), ), ); diff --git a/api/v3/examples/Group/getfields.php b/api/v3/examples/Group/getfields.php index c601bd49e1..3dd054b100 100644 --- a/api/v3/examples/Group/getfields.php +++ b/api/v3/examples/Group/getfields.php @@ -30,7 +30,7 @@ function group_getfields_expectedresult(){ $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 19, + 'count' => 20, 'values' => array( 'id' => array( 'name' => 'id', @@ -62,6 +62,9 @@ function group_getfields_expectedresult(){ 'title' => 'Group Description', 'rows' => 2, 'cols' => 60, + 'html' => array( + 'type' => 'TextArea', + ), ), 'source' => array( 'name' => 'source', @@ -86,8 +89,15 @@ function group_getfields_expectedresult(){ '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', @@ -147,6 +157,12 @@ function group_getfields_expectedresult(){ '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', + ), ), ); diff --git a/api/v3/examples/GroupContact/Delete.php b/api/v3/examples/GroupContact/Delete.php index 4469f5f33b..c61c1a74e7 100644 --- a/api/v3/examples/GroupContact/Delete.php +++ b/api/v3/examples/GroupContact/Delete.php @@ -5,8 +5,8 @@ */ function group_contact_delete_example(){ $params = array( - 'contact_id' => 1, - 'group_id' => 1, + 'id' => 4, + 'skip_undelete' => true, ); try{ @@ -34,7 +34,7 @@ function group_contact_delete_expectedresult(){ 'count' => 1, 'values' => 1, 'total_count' => 1, - 'removed' => 1, + 'removed' => 0, 'not_removed' => 0, ); @@ -45,7 +45,7 @@ function group_contact_delete_expectedresult(){ /* * 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 diff --git a/api/v3/examples/GroupContact/GetWithGroupID.php b/api/v3/examples/GroupContact/GetWithGroupID.php index aabbfce507..62a9b3d115 100644 --- a/api/v3/examples/GroupContact/GetWithGroupID.php +++ b/api/v3/examples/GroupContact/GetWithGroupID.php @@ -50,8 +50,6 @@ function group_contact_get_expectedresult(){ '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\") ) ', @@ -61,13 +59,8 @@ function group_contact_get_expectedresult(){ '0' => '1', '1' => '2', ), - 'cache_date' => '', - 'refresh_date' => '', - 'parents' => '', - 'children' => '', 'is_hidden' => 0, 'is_reserved' => 0, - 'created_id' => '', ), ), ), @@ -88,8 +81,6 @@ function group_contact_get_expectedresult(){ '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\") ) ', @@ -99,13 +90,8 @@ function group_contact_get_expectedresult(){ '0' => '1', '1' => '2', ), - 'cache_date' => '', - 'refresh_date' => '', - 'parents' => '', - 'children' => '', 'is_hidden' => 0, 'is_reserved' => 0, - 'created_id' => '', ), ), ), diff --git a/api/v3/examples/Job/Delete.php b/api/v3/examples/Job/Delete.php index 6230b31d8e..759d3d36e9 100644 --- a/api/v3/examples/Job/Delete.php +++ b/api/v3/examples/Job/Delete.php @@ -27,12 +27,7 @@ return $result; */ function job_delete_expectedresult(){ - $expectedResult = array( - 'is_error' => 0, - 'version' => 3, - 'count' => 1, - 'values' => true, -); + $expectedResult = ''; return $expectedResult; } diff --git a/api/v3/examples/LineItem/Create.php b/api/v3/examples/LineItem/Create.php index b85b2f819d..520a7601b0 100644 --- a/api/v3/examples/LineItem/Create.php +++ b/api/v3/examples/LineItem/Create.php @@ -44,6 +44,7 @@ function line_item_create_expectedresult(){ 'id' => '1', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', + 'contribution_id' => '', 'price_field_id' => '1', 'label' => 'line item', 'qty' => '1', diff --git a/api/v3/examples/LineItem/Get.php b/api/v3/examples/LineItem/Get.php index 7ab45ed884..feeb147c23 100644 --- a/api/v3/examples/LineItem/Get.php +++ b/api/v3/examples/LineItem/Get.php @@ -37,6 +37,7 @@ function line_item_get_expectedresult(){ 'id' => '1', 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', + 'contribution_id' => '1', 'price_field_id' => '1', 'label' => 'Contribution Amount', 'qty' => '1', diff --git a/api/v3/examples/LocBlock/createEntities.php b/api/v3/examples/LocBlock/createEntities.php index 5db83b4eed..a10c0e2a01 100644 --- a/api/v3/examples/LocBlock/createEntities.php +++ b/api/v3/examples/LocBlock/createEntities.php @@ -1,9 +1,9 @@ array( 'location_type_id' => 1, @@ -24,7 +24,7 @@ $params = array( ); try{ - $result = civicrm_api3('loc_block', 'createEntities', $params); + $result = civicrm_api3('loc_block', 'create', $params); } catch (CiviCRM_API3_Exception $e) { // handle error here @@ -40,7 +40,7 @@ return $result; /** * Function returns array of result expected from previous function */ -function loc_block_createentities_expectedresult(){ +function loc_block_create_expectedresult(){ $expectedResult = array( 'is_error' => 0, @@ -58,7 +58,7 @@ function loc_block_createentities_expectedresult(){ 'manual_geo_code' => 0, ), 'email' => array( - 'id' => '4', + 'id' => '33', 'contact_id' => '', 'location_type_id' => '1', 'email' => 'test2@loc.block', @@ -97,7 +97,7 @@ function loc_block_createentities_expectedresult(){ ), 'id' => '3', 'address_id' => '3', - 'email_id' => '4', + 'email_id' => '33', 'phone_id' => '3', 'im_id' => '', 'address_2_id' => '', diff --git a/api/v3/examples/LocBlock/getEntities.php b/api/v3/examples/LocBlock/getEntities.php index 9043e8c57a..a79cd0bc1d 100644 --- a/api/v3/examples/LocBlock/getEntities.php +++ b/api/v3/examples/LocBlock/getEntities.php @@ -37,7 +37,7 @@ function loc_block_get_expectedresult(){ '3' => array( 'id' => '3', 'address_id' => '3', - 'email_id' => '4', + 'email_id' => '33', 'phone_id' => '3', 'phone_2_id' => '4', 'address' => array( @@ -49,7 +49,7 @@ function loc_block_get_expectedresult(){ 'manual_geo_code' => 0, ), 'email' => array( - 'id' => '4', + 'id' => '33', 'location_type_id' => '1', 'email' => 'test2@loc.block', 'is_primary' => 0, @@ -85,16 +85,16 @@ function loc_block_get_expectedresult(){ * 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 diff --git a/api/v3/examples/LocBlock/simpleCreate.php b/api/v3/examples/LocBlock/simpleCreate.php index a681afb6f6..5bc9adb710 100644 --- a/api/v3/examples/LocBlock/simpleCreate.php +++ b/api/v3/examples/LocBlock/simpleCreate.php @@ -7,7 +7,7 @@ function loc_block_create_example(){ $params = array( 'address_id' => 2, 'phone_id' => 2, - 'email_id' => 3, + 'email_id' => 32, ); try{ @@ -38,7 +38,7 @@ function loc_block_create_expectedresult(){ '2' => array( 'id' => '2', 'address_id' => '2', - 'email_id' => '3', + 'email_id' => '32', 'phone_id' => '2', 'im_id' => '', 'address_2_id' => '', @@ -57,16 +57,16 @@ function loc_block_create_expectedresult(){ * 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 diff --git a/api/v3/examples/MailSettings/ChainedGetDelete.php b/api/v3/examples/MailSettings/ChainedGetDelete.php index 683aea79e4..4f4c520998 100644 --- a/api/v3/examples/MailSettings/ChainedGetDelete.php +++ b/api/v3/examples/MailSettings/ChainedGetDelete.php @@ -37,7 +37,7 @@ function mail_settings_get_expectedresult(){ 'id' => '1', 'domain_id' => '1', 'name' => 'default', - 'is_default' => '1', + 'is_default' => 0, 'domain' => 'EXAMPLE.ORG', 'api.MailSettings.delete' => array( 'is_error' => 0, @@ -46,11 +46,11 @@ function mail_settings_get_expectedresult(){ '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', diff --git a/api/v3/examples/MailSettings/Create.php b/api/v3/examples/MailSettings/Create.php index 8272466d5c..f465c2942b 100644 --- a/api/v3/examples/MailSettings/Create.php +++ b/api/v3/examples/MailSettings/Create.php @@ -12,6 +12,7 @@ $params = array( 'server' => 'localhost', 'username' => 'sue', 'password' => 'pass', + 'is_default' => 1, ); try{ @@ -43,7 +44,7 @@ function mail_settings_create_expectedresult(){ 'id' => '2', 'domain_id' => '1', 'name' => 'my mail setting', - 'is_default' => '', + 'is_default' => '1', 'domain' => 'setting.com', 'localpart' => '', 'return_path' => '', diff --git a/api/v3/examples/MailSettings/Delete.php b/api/v3/examples/MailSettings/Delete.php index 0a761675c3..482d9c3396 100644 --- a/api/v3/examples/MailSettings/Delete.php +++ b/api/v3/examples/MailSettings/Delete.php @@ -5,7 +5,7 @@ */ function mail_settings_delete_example(){ $params = array( - 'id' => 2, + 'id' => 5, ); try{ diff --git a/api/v3/examples/MailSettings/Get.php b/api/v3/examples/MailSettings/Get.php index c2aac298c0..0083f7008e 100644 --- a/api/v3/examples/MailSettings/Get.php +++ b/api/v3/examples/MailSettings/Get.php @@ -12,6 +12,7 @@ $params = array( 'server' => 'localhost', 'username' => 'sue', 'password' => 'pass', + 'is_default' => 1, ); try{ @@ -37,13 +38,13 @@ function mail_settings_get_expectedresult(){ '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', diff --git a/api/v3/examples/Mailing/Create.php b/api/v3/examples/Mailing/Create.php new file mode 100644 index 0000000000..fed0c7dd8f --- /dev/null +++ b/api/v3/examples/Mailing/Create.php @@ -0,0 +1,125 @@ + '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 +*/ diff --git a/api/v3/examples/Mailing/Delete.php b/api/v3/examples/Mailing/Delete.php new file mode 100644 index 0000000000..3112bbf070 --- /dev/null +++ b/api/v3/examples/Mailing/Delete.php @@ -0,0 +1,61 @@ + 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 +*/ diff --git a/api/v3/examples/Membership/Create.php b/api/v3/examples/Membership/Create.php index b9c83e4040..7e8a297817 100644 --- a/api/v3/examples/Membership/Create.php +++ b/api/v3/examples/Membership/Create.php @@ -5,14 +5,14 @@ */ 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', ); @@ -43,13 +43,13 @@ function membership_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Membership/Get.php b/api/v3/examples/Membership/Get.php index 5be5c613ad..e59994618e 100644 --- a/api/v3/examples/Membership/Get.php +++ b/api/v3/examples/Membership/Get.php @@ -35,7 +35,7 @@ function membership_get_expectedresult(){ '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', diff --git a/api/v3/examples/Membership/Update.php b/api/v3/examples/Membership/Update.php index f219dccecd..8fa367659b 100644 --- a/api/v3/examples/Membership/Update.php +++ b/api/v3/examples/Membership/Update.php @@ -5,14 +5,14 @@ */ 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', ); @@ -43,13 +43,13 @@ function membership_update_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Membership/filterIsCurrent.php b/api/v3/examples/Membership/filterIsCurrent.php index 89ae98e702..65aa8ded80 100644 --- a/api/v3/examples/Membership/filterIsCurrent.php +++ b/api/v3/examples/Membership/filterIsCurrent.php @@ -5,7 +5,7 @@ */ function membership_get_example(){ $params = array( - 'contact_id' => 18, + 'contact_id' => 44, 'filters' => array( 'is_current' => 1, ), @@ -38,7 +38,7 @@ function membership_get_expectedresult(){ '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', diff --git a/api/v3/examples/MembershipType/Create.php b/api/v3/examples/MembershipType/Create.php index 73a57deaba..9217360662 100644 --- a/api/v3/examples/MembershipType/Create.php +++ b/api/v3/examples/MembershipType/Create.php @@ -58,7 +58,7 @@ function membership_type_create_expectedresult(){ 'relationship_type_id' => '', 'relationship_direction' => '', 'max_related' => '', - 'visibility' => '1', + 'visibility' => 'Public', 'weight' => '', 'receipt_text_signup' => '', 'receipt_text_renewal' => '', diff --git a/api/v3/examples/MembershipType/Get.php b/api/v3/examples/MembershipType/Get.php index 06c63a8ee2..120de5de12 100644 --- a/api/v3/examples/MembershipType/Get.php +++ b/api/v3/examples/MembershipType/Get.php @@ -43,7 +43,7 @@ function membership_type_get_expectedresult(){ 'duration_unit' => 'year', 'duration_interval' => '1', 'period_type' => 'rolling', - 'visibility' => '1', + 'visibility' => 'Public', 'auto_renew' => 0, 'is_active' => '1', ), diff --git a/api/v3/examples/MessageTemplate/Create.php b/api/v3/examples/MessageTemplate/Create.php index f1ce5c18c2..7d499bbdff 100644 --- a/api/v3/examples/MessageTemplate/Create.php +++ b/api/v3/examples/MessageTemplate/Create.php @@ -5,11 +5,11 @@ */ 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, ); @@ -41,12 +41,12 @@ function message_template_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/MessageTemplate/Get.php b/api/v3/examples/MessageTemplate/Get.php index 95e57c6be5..56eaecc772 100644 --- a/api/v3/examples/MessageTemplate/Get.php +++ b/api/v3/examples/MessageTemplate/Get.php @@ -5,11 +5,11 @@ */ 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, ); @@ -41,15 +41,15 @@ function message_template_get_expectedresult(){ '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', ), ), ); diff --git a/api/v3/examples/OptionGroup/Create.php b/api/v3/examples/OptionGroup/Create.php index 75a0bdeac6..8f799d1f20 100644 --- a/api/v3/examples/OptionGroup/Create.php +++ b/api/v3/examples/OptionGroup/Create.php @@ -41,16 +41,17 @@ function option_group_create_expectedresult(){ '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, ), ), ); diff --git a/api/v3/examples/OptionGroup/Delete.php b/api/v3/examples/OptionGroup/Delete.php index d69810770b..b75a2f0287 100644 --- a/api/v3/examples/OptionGroup/Delete.php +++ b/api/v3/examples/OptionGroup/Delete.php @@ -5,7 +5,7 @@ */ function option_group_delete_example(){ $params = array( - 'id' => 91, + 'id' => 94, ); try{ diff --git a/api/v3/examples/OptionGroup/Get.php b/api/v3/examples/OptionGroup/Get.php index f2e6d591c9..779bc24172 100644 --- a/api/v3/examples/OptionGroup/Get.php +++ b/api/v3/examples/OptionGroup/Get.php @@ -39,6 +39,7 @@ function option_group_get_expectedresult(){ 'title' => 'Preferred Communication Method', 'is_reserved' => '1', 'is_active' => '1', + 'is_locked' => 0, ), ), ); diff --git a/api/v3/examples/Participant/CreateParticipantPayment.php b/api/v3/examples/Participant/CreateParticipantPayment.php index 19729e30df..1f70d8f36e 100644 --- a/api/v3/examples/Participant/CreateParticipantPayment.php +++ b/api/v3/examples/Participant/CreateParticipantPayment.php @@ -1,7 +1,7 @@ 'Individual', 'display_name' => 'dlobo', 'api.participant' => array( - 'event_id' => 39, + 'event_id' => 40, 'status_id' => 1, 'role_id' => 1, 'format.only_id' => 1, @@ -77,6 +77,8 @@ function participant_create_expectedresult(){ 'last_name' => '', 'prefix_id' => '', 'suffix_id' => '', + 'formal_title' => '', + 'communication_style_id' => '', 'email_greeting_id' => '1', 'email_greeting_custom' => '', 'email_greeting_display' => '', diff --git a/api/v3/examples/Participant/Get.php b/api/v3/examples/Participant/Get.php index b3540903b1..7aa04d0e21 100644 --- a/api/v3/examples/Participant/Get.php +++ b/api/v3/examples/Participant/Get.php @@ -50,6 +50,7 @@ function participant_get_expectedresult(){ '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', diff --git a/api/v3/examples/Participant/NestedDelete.php b/api/v3/examples/Participant/NestedDelete.php index bdeabddd7f..788f2b98f7 100644 --- a/api/v3/examples/Participant/NestedDelete.php +++ b/api/v3/examples/Participant/NestedDelete.php @@ -39,7 +39,7 @@ function participant_get_expectedresult(){ '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', @@ -50,6 +50,7 @@ function participant_get_expectedresult(){ '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', @@ -73,7 +74,7 @@ function participant_get_expectedresult(){ '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', @@ -84,6 +85,7 @@ function participant_get_expectedresult(){ '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', diff --git a/api/v3/examples/Participant/NestedEventGet.php b/api/v3/examples/Participant/NestedEventGet.php index f349e432b2..397a255596 100644 --- a/api/v3/examples/Participant/NestedEventGet.php +++ b/api/v3/examples/Participant/NestedEventGet.php @@ -51,6 +51,7 @@ function participant_get_expectedresult(){ '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', @@ -99,6 +100,7 @@ function participant_get_expectedresult(){ 'is_template' => 0, 'created_date' => '2013-07-28 08:49:19', 'is_share' => '1', + 'is_confirm_enabled' => '1', ), ), ), diff --git a/api/v3/examples/ParticipantStatusType/Create.php b/api/v3/examples/ParticipantStatusType/Create.php index 5da922e015..0a61f26347 100644 --- a/api/v3/examples/ParticipantStatusType/Create.php +++ b/api/v3/examples/ParticipantStatusType/Create.php @@ -38,13 +38,13 @@ function participant_status_type_create_expectedresult(){ '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', diff --git a/api/v3/examples/ParticipantStatusType/Delete.php b/api/v3/examples/ParticipantStatusType/Delete.php index 47ffb9bac9..74a74ec498 100644 --- a/api/v3/examples/ParticipantStatusType/Delete.php +++ b/api/v3/examples/ParticipantStatusType/Delete.php @@ -5,7 +5,7 @@ */ function participant_status_type_delete_example(){ $params = array( - 'id' => 15, + 'id' => 17, ); try{ diff --git a/api/v3/examples/ParticipantStatusType/Get.php b/api/v3/examples/ParticipantStatusType/Get.php index 28a80da2d3..0a5c0ed836 100644 --- a/api/v3/examples/ParticipantStatusType/Get.php +++ b/api/v3/examples/ParticipantStatusType/Get.php @@ -38,13 +38,13 @@ function participant_status_type_get_expectedresult(){ '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', diff --git a/api/v3/examples/Pledge/Create.php b/api/v3/examples/Pledge/Create.php index b48e949987..82d61298e4 100644 --- a/api/v3/examples/Pledge/Create.php +++ b/api/v3/examples/Pledge/Create.php @@ -6,9 +6,9 @@ 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', @@ -63,8 +63,6 @@ function pledge_create_expectedresult(){ 'modified_date' => '', 'cancel_date' => '', 'end_date' => '', - 'honor_contact_id' => '', - 'honor_type_id' => '', 'max_reminders' => '', 'initial_reminder_day' => '', 'additional_reminder_day' => '', diff --git a/api/v3/examples/Pledge/Get.php b/api/v3/examples/Pledge/Get.php index d36cb51d6b..460ebabdba 100644 --- a/api/v3/examples/Pledge/Get.php +++ b/api/v3/examples/Pledge/Get.php @@ -41,10 +41,10 @@ function pledge_get_expectedresult(){ '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', diff --git a/api/v3/examples/Pledge/GetFilterHighDate.php b/api/v3/examples/Pledge/GetFilterHighDate.php index ceb3e1919c..2539d81ab6 100644 --- a/api/v3/examples/Pledge/GetFilterHighDate.php +++ b/api/v3/examples/Pledge/GetFilterHighDate.php @@ -5,7 +5,7 @@ */ function pledge_get_example(){ $params = array( - 'pledge_start_date_high' => '20140211002809', + 'pledge_start_date_high' => '20140926232809', ); try{ @@ -41,7 +41,7 @@ function pledge_get_expectedresult(){ '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', diff --git a/api/v3/examples/PriceSet/Delete.php b/api/v3/examples/PriceSet/Delete.php index 696554da0a..71bdf5e5c4 100644 --- a/api/v3/examples/PriceSet/Delete.php +++ b/api/v3/examples/PriceSet/Delete.php @@ -5,7 +5,7 @@ */ function price_set_delete_example(){ $params = array( - 'id' => 17, + 'id' => 18, ); try{ diff --git a/api/v3/examples/Profile/Apply.php b/api/v3/examples/Profile/Apply.php index 50fa56f9dd..41c8abfe2d 100644 --- a/api/v3/examples/Profile/Apply.php +++ b/api/v3/examples/Profile/Apply.php @@ -6,7 +6,7 @@ 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', @@ -41,7 +41,7 @@ function profile_apply_expectedresult(){ 'values' => array( 'contact_type' => 'Individual', 'contact_sub_type' => '', - 'contact_id' => 2, + 'contact_id' => 3, 'version' => 3, 'debug' => 1, 'profile_id' => 31, diff --git a/api/v3/examples/Profile/Get.php b/api/v3/examples/Profile/Get.php index eb68a10078..1e229acffa 100644 --- a/api/v3/examples/Profile/Get.php +++ b/api/v3/examples/Profile/Get.php @@ -6,11 +6,11 @@ function profile_get_example(){ $params = array( 'profile_id' => array( - '0' => 14, + '0' => 15, '1' => 1, '2' => 'Billing', ), - 'contact_id' => 2, + 'contact_id' => 3, ); try{ @@ -37,7 +37,7 @@ function profile_get_expectedresult(){ 'version' => 3, 'count' => 3, 'values' => array( - '14' => array( + '15' => array( 'postal_code-1' => '90210', 'state_province-1' => '1021', 'country-1' => '1228', diff --git a/api/v3/examples/Profile/GetFields.php b/api/v3/examples/Profile/GetFields.php index ecb4bb2ae8..37f5a5890d 100644 --- a/api/v3/examples/Profile/GetFields.php +++ b/api/v3/examples/Profile/GetFields.php @@ -51,10 +51,11 @@ function profile_getfields_expectedresult(){ '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', @@ -84,6 +85,9 @@ function profile_getfields_expectedresult(){ 'type' => 1, 'title' => 'State Province', 'FKClassName' => 'CRM_Core_DAO_StateProvince', + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'table' => 'civicrm_state_province', 'keyColumn' => 'id', @@ -101,6 +105,9 @@ function profile_getfields_expectedresult(){ 'type' => 1, 'title' => 'Country', 'FKClassName' => 'CRM_Core_DAO_Country', + 'html' => array( + 'type' => 'Select', + ), 'pseudoconstant' => array( 'table' => 'civicrm_country', 'keyColumn' => 'id', @@ -144,6 +151,9 @@ function profile_getfields_expectedresult(){ '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' => '', @@ -164,6 +174,9 @@ function profile_getfields_expectedresult(){ 'headerPattern' => '/^last|(l(ast\\s)?name)$/i', 'dataPattern' => '/^\\w+(\\s\\w+)?+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -182,6 +195,9 @@ function profile_getfields_expectedresult(){ 'headerPattern' => '/^first|(f(irst\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => true, + 'html' => array( + 'type' => 'Text', + ), 'api.required' => '1', 'help_pre' => '', 'help_post' => '', @@ -191,6 +207,7 @@ function profile_getfields_expectedresult(){ ), 'profile_id' => array( 'api.required' => true, + 'title' => 'Profile ID', ), ), ); diff --git a/api/v3/examples/Profile/Submit.php b/api/v3/examples/Profile/Submit.php index a080f59167..564522bd8b 100644 --- a/api/v3/examples/Profile/Submit.php +++ b/api/v3/examples/Profile/Submit.php @@ -6,7 +6,7 @@ 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', @@ -38,10 +38,10 @@ function profile_submit_expectedresult(){ '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, @@ -53,7 +53,7 @@ function profile_submit_expectedresult(){ 'legal_identifier' => '', 'external_identifier' => '', 'sort_name' => 'xyz2, abc2', - 'display_name' => 'abc2 xyz2', + 'display_name' => 'Mr. abc2 xyz2 II', 'nick_name' => '', 'legal_name' => '', 'image_URL' => '', @@ -67,6 +67,8 @@ function profile_submit_expectedresult(){ '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', diff --git a/api/v3/examples/ReportTemplate/Getrows.php b/api/v3/examples/ReportTemplate/Getrows.php index 298439eca7..b75584b9d6 100644 --- a/api/v3/examples/ReportTemplate/Getrows.php +++ b/api/v3/examples/ReportTemplate/Getrows.php @@ -41,16 +41,10 @@ function report_template_getrows_expectedresult(){ '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( @@ -58,9 +52,6 @@ function report_template_getrows_expectedresult(){ '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', ), ), ); diff --git a/api/v3/examples/Setting/GetFields.php b/api/v3/examples/Setting/GetFields.php index dc5329d082..b121743ab1 100644 --- a/api/v3/examples/Setting/GetFields.php +++ b/api/v3/examples/Setting/GetFields.php @@ -28,7 +28,7 @@ function setting_getfields_expectedresult(){ $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 82, + 'count' => 89, 'values' => array( 'address_standardization_provider' => array( 'group_name' => 'Address Preferences', @@ -320,7 +320,7 @@ function setting_getfields_expectedresult(){ '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' => '', @@ -334,7 +334,7 @@ function setting_getfields_expectedresult(){ 'html_type' => 'Text', 'default' => '', 'add' => '4.1', - 'title' => '', + 'title' => 'Wysiwig Editor', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -348,7 +348,21 @@ function setting_getfields_expectedresult(){ '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' => '', @@ -426,7 +440,7 @@ function setting_getfields_expectedresult(){ '6' => '7', ), 'add' => '4.1', - 'title' => '', + 'title' => 'Contact Reference Options', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -533,6 +547,21 @@ function setting_getfields_expectedresult(){ 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', @@ -638,7 +667,6 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'group' => 'core', 'name' => 'checksumTimeout', 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'Text', @@ -659,7 +687,6 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'group' => 'core', 'name' => 'blogUrl', 'prefetch' => 0, - 'config_only' => 0, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', @@ -680,7 +707,6 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'group' => 'core', 'name' => 'communityMessagesUrl', 'prefetch' => 0, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'Text', @@ -725,7 +751,7 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl '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', @@ -752,7 +778,6 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'group' => 'core', 'name' => 'secondDegRelPermissions', 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 0, @@ -818,21 +843,21 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl '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', @@ -849,7 +874,6 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'userFrameworkLogging', - 'config_only' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 0, @@ -866,7 +890,6 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'group_name' => 'Developer Preferences', 'group' => 'developer', 'name' => 'backtrace', - 'config_only' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 0, @@ -881,9 +904,9 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t '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', @@ -896,10 +919,10 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t '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, @@ -916,11 +939,11 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t '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', @@ -931,7 +954,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'default' => '', 'add' => '4.1', 'prefetch' => 1, - 'title' => '', + 'title' => 'Image Directory', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -946,7 +969,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'default' => '', 'add' => '4.1', 'prefetch' => 1, - 'title' => '', + 'title' => 'Custom Files Upload Directory', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -961,7 +984,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'default' => '', 'add' => '4.1', 'prefetch' => 1, - 'title' => '', + 'title' => 'Custom Template Directory', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -976,7 +999,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'default' => '', 'add' => '4.1', 'prefetch' => 1, - 'title' => '', + 'title' => 'Custom PHP Path', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -991,7 +1014,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'default' => '', 'add' => '4.1', 'prefetch' => 1, - 'title' => '', + 'title' => 'Extensions Directory', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1282,7 +1305,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t '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.', @@ -1296,7 +1319,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.1', - 'title' => '', + 'title' => 'Lock Mails Server-Wide for Mail Sending', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1310,7 +1333,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'html_type' => 'checkbox', 'default' => 0, 'add' => '4.1', - 'title' => '', + 'title' => 'Mailing Backend', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1344,6 +1367,34 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t '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', @@ -1365,6 +1416,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'is_enabled', + 'title' => 'Multisite Is enabled', 'type' => 'Integer', 'default' => '', 'add' => '4.1', @@ -1377,6 +1429,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'domain_group_id', + 'title' => 'Multisite Domain Group', 'type' => 'Integer', 'default' => '', 'add' => '4.1', @@ -1389,6 +1442,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'group_name' => 'Multi Site Preferences', 'group' => 'multisite', 'name' => 'event_price_set_domain_id', + 'title' => 'Domain Event Price Set', 'type' => 'Integer', 'default' => '', 'add' => '4.1', @@ -1402,6 +1456,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'group' => 'multisite', 'name' => 'uniq_email_per_site', 'type' => 'Integer', + 'title' => 'Unique Email per Domain?', 'default' => '', 'add' => '4.1', 'is_domain' => 1, @@ -1429,10 +1484,52 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t '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', @@ -1446,6 +1543,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'imageUploadURL' => array( 'group' => 'url', 'group_name' => 'URL Preferences', + 'title' => 'Image URL Prefix', 'name' => 'imageUploadURL', 'type' => 'String', 'default' => '', @@ -1461,6 +1559,7 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t 'group' => 'url', 'group_name' => 'URL Preferences', 'name' => 'customCSSURL', + 'title' => 'Custom CSS', 'type' => 'String', 'default' => '', 'add' => '4.1', diff --git a/api/v3/examples/Survey/ChainedGetDelete.php b/api/v3/examples/Survey/ChainedGetDelete.php index 21e9c34137..6ef6402f30 100644 --- a/api/v3/examples/Survey/ChainedGetDelete.php +++ b/api/v3/examples/Survey/ChainedGetDelete.php @@ -37,7 +37,7 @@ function survey_get_expectedresult(){ '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', diff --git a/api/v3/examples/Survey/Create.php b/api/v3/examples/Survey/Create.php index 4d4051d7d2..e0fc59ce8c 100644 --- a/api/v3/examples/Survey/Create.php +++ b/api/v3/examples/Survey/Create.php @@ -6,7 +6,7 @@ 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', ); @@ -40,7 +40,7 @@ function survey_create_expectedresult(){ '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' => '', diff --git a/api/v3/examples/Survey/Get.php b/api/v3/examples/Survey/Get.php index 9fbc176b57..40f79b4071 100644 --- a/api/v3/examples/Survey/Get.php +++ b/api/v3/examples/Survey/Get.php @@ -6,7 +6,7 @@ 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', ); @@ -39,7 +39,7 @@ function survey_get_expectedresult(){ '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', diff --git a/api/v3/examples/SurveyRespondant/Get.php b/api/v3/examples/SurveyRespondant/Get.php index db6f90510b..8f0c63c0f8 100644 --- a/api/v3/examples/SurveyRespondant/Get.php +++ b/api/v3/examples/SurveyRespondant/Get.php @@ -1,6 +1,6 @@ '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 +*/ diff --git a/api/v3/examples/Tag/Getfields.php b/api/v3/examples/Tag/Getfields.php index 6c7f9d2e7a..a329f22002 100644 --- a/api/v3/examples/Tag/Getfields.php +++ b/api/v3/examples/Tag/Getfields.php @@ -35,6 +35,7 @@ function tag_getfields_expectedresult(){ 'id' => array( 'name' => 'id', 'type' => 1, + 'title' => 'Tag ID', 'required' => true, 'api.aliases' => array( '0' => 'tag', @@ -43,7 +44,7 @@ function tag_getfields_expectedresult(){ 'name' => array( 'name' => 'name', 'type' => 2, - 'title' => 'Name', + 'title' => 'Tag Name', 'required' => true, 'maxlength' => 64, 'size' => 30, @@ -59,21 +60,25 @@ function tag_getfields_expectedresult(){ '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', @@ -82,11 +87,18 @@ function tag_getfields_expectedresult(){ '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( diff --git a/api/v3/examples/UFField/Create.php b/api/v3/examples/UFField/Create.php index 8382d9f533..701f005699 100644 --- a/api/v3/examples/UFField/Create.php +++ b/api/v3/examples/UFField/Create.php @@ -57,6 +57,7 @@ function uf_field_create_expectedresult(){ 'is_searchable' => '1', 'location_type_id' => '1', 'phone_type_id' => '1', + 'website_type_id' => '', 'label' => 'Test Phone', 'field_type' => 'Contact', 'is_reserved' => '', diff --git a/api/v3/examples/UFField/Replace.php b/api/v3/examples/UFField/Replace.php index 76fa5084b5..0a162cc200 100644 --- a/api/v3/examples/UFField/Replace.php +++ b/api/v3/examples/UFField/Replace.php @@ -80,6 +80,7 @@ function uf_field_replace_expectedresult(){ 'is_searchable' => '1', 'location_type_id' => '', 'phone_type_id' => '', + 'website_type_id' => '', 'label' => 'Test First Name', 'field_type' => 'Contact', 'is_reserved' => '', @@ -100,6 +101,7 @@ function uf_field_replace_expectedresult(){ 'is_searchable' => '1', 'location_type_id' => '1', 'phone_type_id' => '', + 'website_type_id' => '', 'label' => 'Test Country', 'field_type' => 'Contact', 'is_reserved' => '', @@ -120,6 +122,7 @@ function uf_field_replace_expectedresult(){ 'is_searchable' => '1', 'location_type_id' => '1', 'phone_type_id' => '1', + 'website_type_id' => '', 'label' => 'Test Phone', 'field_type' => 'Contact', 'is_reserved' => '', diff --git a/api/v3/examples/Website/GetFields.php b/api/v3/examples/Website/GetFields.php index baaa7f4f49..bd16132d6b 100644 --- a/api/v3/examples/Website/GetFields.php +++ b/api/v3/examples/Website/GetFields.php @@ -58,11 +58,17 @@ function website_getfields_expectedresult(){ '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', ), diff --git a/api/v3/examples/Website/GetWithMetadata.php b/api/v3/examples/Website/GetWithMetadata.php index 262924e1bd..3ed1be650c 100644 --- a/api/v3/examples/Website/GetWithMetadata.php +++ b/api/v3/examples/Website/GetWithMetadata.php @@ -64,11 +64,17 @@ function website_get_expectedresult(){ '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', ), -- 2.25.1