From 923d89009a49cf392a904b1c7d1125119fc6382c Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 17 Jan 2022 13:47:39 +1100 Subject: [PATCH] [NFC] Update test example template and regenerate examples --- .../Activity/ContactRefCustomField.ex.php | 14 +- .../Activity/ContactRefCustomFieldGet.ex.php | 16 +- api/v3/examples/Activity/Create.ex.php | 14 +- api/v3/examples/Activity/DateTimeHigh.ex.php | 27 +- api/v3/examples/Activity/DateTimeLow.ex.php | 27 +- api/v3/examples/Activity/Delete.ex.php | 12 +- api/v3/examples/Activity/Get.ex.php | 31 +- api/v3/examples/Activity/GetFields.ex.php | 233 +++++- .../Activity/GetTargetAndAssignee.ex.php | 118 +++ .../Activity/GetTargetandAssigneeName.ex.php | 26 +- .../Activity/ReturnAssigneeContact.ex.php | 41 +- api/v3/examples/ActivityContact/Delete.ex.php | 2 +- api/v3/examples/ActivityType/Create.ex.php | 6 +- api/v3/examples/Address/AddressLike.ex.php | 15 +- api/v3/examples/Address/AddressParse.ex.php | 10 +- api/v3/examples/Address/AddressSort.ex.php | 25 +- api/v3/examples/Address/Create.ex.php | 10 +- api/v3/examples/Address/Delete.ex.php | 2 +- api/v3/examples/Address/Get.ex.php | 21 +- api/v3/examples/Batch/Create.ex.php | 8 +- api/v3/examples/Batch/Delete.ex.php | 2 +- api/v3/examples/Batch/Get.ex.php | 1 + api/v3/examples/Campaign/Delete.ex.php | 2 +- api/v3/examples/Campaign/Get.ex.php | 6 +- .../examples/Contact/APIChainedArray.ex.php | 5 +- .../Contact/APIChainedArrayFormats.ex.php | 6 +- .../APIChainedArrayMultipleCustom.ex.php | 4 +- .../examples/Contact/ChainTwoWebsites.ex.php | 11 +- .../Contact/ChainTwoWebsitesSyntax2.ex.php | 11 +- .../ContactIDOfLoggedInUserContactAPI.ex.php | 8 +- .../Contact/CreateParticipantPayment.ex.php | 10 +- api/v3/examples/Contact/Get.ex.php | 2 +- .../examples/Contact/GetFieldsOptions.ex.php | 168 ++++- .../examples/Contact/GetSingleContact.ex.php | 2 +- .../Contact/GroupFilterUsingContactAPI.ex.php | 8 +- .../Contact/NestedReplaceEmail.ex.php | 10 +- ...ontributionCreateWithHonoreeContact.ex.php | 8 +- .../ContributionCreateWithNote.ex.php | 6 +- .../ContributionCreateWithSoftCredit.ex.php | 8 +- ...ibutionCreateWithSoftCreditDefaults.ex.php | 8 +- api/v3/examples/Contribution/Create.ex.php | 6 +- .../CreateWithNestedLineItems.ex.php | 10 +- api/v3/examples/Contribution/Get.ex.php | 45 +- .../examples/ContributionPage/Create.ex.php | 8 +- .../examples/ContributionPage/Delete.ex.php | 4 +- api/v3/examples/ContributionPage/Get.ex.php | 1 + .../examples/ContributionPage/Submit.ex.php | 4 +- .../examples/ContributionRecur/Create.ex.php | 8 +- .../examples/ContributionRecur/Delete.ex.php | 6 +- api/v3/examples/ContributionRecur/Get.ex.php | 8 +- api/v3/examples/Country/Create.ex.php | 7 +- api/v3/examples/Country/Delete.ex.php | 2 +- api/v3/examples/Country/Get.ex.php | 7 +- api/v3/examples/CustomField/Create.ex.php | 1 + api/v3/examples/CustomGroup/Create.ex.php | 1 + api/v3/examples/Domain/Get.ex.php | 10 +- api/v3/examples/Email/Create.ex.php | 8 +- api/v3/examples/Email/Delete.ex.php | 2 +- api/v3/examples/Email/Replace.ex.php | 20 +- api/v3/examples/EntityBatch/Create.ex.php | 2 +- api/v3/examples/EntityBatch/Get.ex.php | 4 +- api/v3/examples/EntityTag/Get.ex.php | 6 +- .../Event/ContactRefCustomField.ex.php | 4 +- api/v3/examples/Event/Create.ex.php | 1 + api/v3/examples/Event/IsFullOption.ex.php | 2 +- api/v3/examples/Group/Get.ex.php | 3 - api/v3/examples/Group/GetFields.ex.php | 101 ++- .../GroupContact/GetWithGroupID.ex.php | 3 - .../examples/GroupOrganization/Create.ex.php | 14 +- .../examples/GroupOrganization/Delete.ex.php | 2 +- api/v3/examples/GroupOrganization/Get.ex.php | 2 +- api/v3/examples/Im/Create.ex.php | 8 +- api/v3/examples/Im/Delete.ex.php | 2 +- api/v3/examples/Im/Get.ex.php | 8 +- api/v3/examples/Job/Clone.ex.php | 2 +- api/v3/examples/Job/Create.ex.php | 4 +- api/v3/examples/LineItem/Create.ex.php | 12 +- api/v3/examples/LineItem/Delete.ex.php | 2 +- api/v3/examples/LineItem/Get.ex.php | 11 +- api/v3/examples/Logging/Get.ex.php | 64 +- api/v3/examples/Logging/Revert.ex.php | 4 +- .../MailSettings/ChainedGetDelete.ex.php | 8 +- api/v3/examples/MailSettings/Create.ex.php | 8 +- api/v3/examples/MailSettings/Delete.ex.php | 2 +- api/v3/examples/MailSettings/Get.ex.php | 8 +- api/v3/examples/Mailing/Clone.ex.php | 12 +- api/v3/examples/Mailing/Create.ex.php | 24 +- api/v3/examples/Mailing/Delete.ex.php | 2 +- api/v3/examples/Mailing/GetTokens.ex.php | 82 ++- api/v3/examples/Mailing/Submit.ex.php | 16 +- api/v3/examples/MailingAB/Create.ex.php | 2 +- api/v3/examples/Membership/Create.ex.php | 4 +- .../Membership/CreateWithCustomData.ex.php | 2 +- api/v3/examples/Membership/Get.ex.php | 16 +- .../Membership/SearchWithCustomData.ex.php | 2 +- .../Membership/UpdateCustomData.ex.php | 6 +- api/v3/examples/MembershipPayment/Get.ex.php | 4 +- api/v3/examples/MembershipType/Create.ex.php | 10 +- api/v3/examples/MembershipType/Delete.ex.php | 2 +- api/v3/examples/MembershipType/Get.ex.php | 2 +- api/v3/examples/MessageTemplate/Create.ex.php | 25 +- api/v3/examples/MessageTemplate/Get.ex.php | 27 +- api/v3/examples/Note/Create.ex.php | 4 + api/v3/examples/Note/Delete.ex.php | 2 +- api/v3/examples/OpenID/Create.ex.php | 9 +- api/v3/examples/OpenID/Delete.ex.php | 2 +- api/v3/examples/OpenID/Get.ex.php | 9 +- api/v3/examples/OptionGroup/Create.ex.php | 2 +- api/v3/examples/Order/Cancel.ex.php | 6 +- api/v3/examples/Order/Create.ex.php | 24 +- .../Order/CreateOrderParticipant.ex.php | 36 +- api/v3/examples/Order/Get.ex.php | 1 + api/v3/examples/Participant/Create.ex.php | 4 +- api/v3/examples/Participant/Get.ex.php | 2 +- .../examples/Participant/NestedDelete.ex.php | 10 +- .../Participant/NestedEventGet.ex.php | 6 +- .../examples/ParticipantPayment/Create.ex.php | 4 +- api/v3/examples/ParticipantPayment/Get.ex.php | 4 +- api/v3/examples/Payment/Cancel.ex.php | 12 +- api/v3/examples/Payment/Create.ex.php | 10 +- .../Payment/CreatePaymentWithLineItems.ex.php | 10 +- api/v3/examples/Payment/Delete.ex.php | 2 +- api/v3/examples/Payment/UpdatePayment.ex.php | 12 +- .../examples/PaymentProcessor/Create.ex.php | 2 +- .../examples/PaymentProcessor/Delete.ex.php | 2 +- .../PaymentProcessorType/Create.ex.php | 4 +- .../PaymentProcessorType/Delete.ex.php | 2 +- api/v3/examples/PaymentToken/Create.ex.php | 20 +- api/v3/examples/PaymentToken/Delete.ex.php | 2 +- api/v3/examples/PaymentToken/Get.ex.php | 18 +- api/v3/examples/Phone/Create.ex.php | 8 +- api/v3/examples/Phone/Delete.ex.php | 2 +- api/v3/examples/Phone/Get.ex.php | 6 +- api/v3/examples/Pledge/Create.ex.php | 6 +- api/v3/examples/Pledge/Get.ex.php | 8 +- .../examples/Pledge/GetFilterHighDate.ex.php | 10 +- api/v3/examples/PriceField/Delete.ex.php | 2 +- api/v3/examples/PriceSet/Create.ex.php | 6 +- api/v3/examples/PriceSet/Delete.ex.php | 2 +- api/v3/examples/PriceSet/Get.ex.php | 2 +- api/v3/examples/Profile/Apply.ex.php | 4 +- api/v3/examples/Profile/Get.ex.php | 4 +- api/v3/examples/Profile/GetFields.ex.php | 21 +- api/v3/examples/Profile/Submit.ex.php | 2 +- .../BetweenRelationshipType.ex.php | 34 +- api/v3/examples/Relationship/Create.ex.php | 24 +- api/v3/examples/Relationship/Delete.ex.php | 12 +- api/v3/examples/Relationship/Get.ex.php | 18 +- .../Relationship/INRelationshipType.ex.php | 28 +- .../NotBetweenRelationshipType.ex.php | 22 +- .../Relationship/NotInRelationshipType.ex.php | 28 +- .../Relationship/filterIsCurrent.ex.php | 18 +- api/v3/examples/ReportTemplate/Getrows.ex.php | 5 + .../ReportTemplate/Getstatistics.ex.php | 6 +- api/v3/examples/SavedSearch/Create.ex.php | 16 + api/v3/examples/SavedSearch/Delete.ex.php | 2 +- api/v3/examples/SavedSearch/Get.ex.php | 3 + api/v3/examples/Setting/Create.ex.php | 6 +- .../examples/Setting/CreateAllDomains.ex.php | 11 +- .../Setting/CreateSpecifiedDomains.ex.php | 4 +- api/v3/examples/Setting/Get.ex.php | 8 +- api/v3/examples/Setting/GetAllDomains.ex.php | 11 +- api/v3/examples/Setting/GetFields.ex.php | 687 ++++++++++++++---- .../Setting/GetSpecifiedDomains.ex.php | 4 +- api/v3/examples/StateProvince/Create.ex.php | 7 +- api/v3/examples/StateProvince/Delete.ex.php | 2 +- api/v3/examples/StateProvince/Get.ex.php | 7 +- .../examples/StatusPreference/Create.ex.php | 7 +- .../examples/StatusPreference/Delete.ex.php | 2 +- api/v3/examples/StatusPreference/Get.ex.php | 9 +- api/v3/examples/Tag/Create.ex.php | 6 +- api/v3/examples/Tag/GetFields.ex.php | 39 +- api/v3/examples/Website/Delete.ex.php | 2 +- api/v3/examples/Website/Get.ex.php | 6 +- api/v3/examples/Website/GetFields.ex.php | 17 +- .../examples/Website/GetWithMetadata.ex.php | 17 +- tests/templates/documentFunction.tpl | 47 +- 177 files changed, 2031 insertions(+), 1015 deletions(-) create mode 100644 api/v3/examples/Activity/GetTargetAndAssignee.ex.php diff --git a/api/v3/examples/Activity/ContactRefCustomField.ex.php b/api/v3/examples/Activity/ContactRefCustomField.ex.php index 9a9b1cf59e..6ad066c634 100644 --- a/api/v3/examples/Activity/ContactRefCustomField.ex.php +++ b/api/v3/examples/Activity/ContactRefCustomField.ex.php @@ -85,6 +85,8 @@ function activity_create_expectedresult() { 'engagement_level' => '', 'weight' => '', 'is_star' => '', + 'created_date' => '', + 'modified_date' => '', ], ], ]; @@ -99,17 +101,17 @@ function activity_create_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/ContactRefCustomFieldGet.ex.php b/api/v3/examples/Activity/ContactRefCustomFieldGet.ex.php index 646de41cba..a2162e39c5 100644 --- a/api/v3/examples/Activity/ContactRefCustomFieldGet.ex.php +++ b/api/v3/examples/Activity/ContactRefCustomFieldGet.ex.php @@ -66,10 +66,14 @@ function activity_get_expectedresult() { 'is_current_revision' => '1', 'is_deleted' => 0, 'is_star' => 0, + 'created_date' => '2013-07-28 08:49:19', + 'modified_date' => '2012-11-14 16:02:35', 'custom_1' => 'defaultValue', 'custom_2_id' => '1', 'custom_2' => 'Anderson, Anthony', 'source_contact_id' => '1', + 'source_contact_name' => 'Mr. Anthony Anderson II', + 'source_contact_sort_name' => 'Anderson, Anthony', 'custom_1_1' => 'defaultValue', 'custom_2_1' => 'Anderson, Anthony', 'custom_2_1_id' => '1', @@ -87,17 +91,17 @@ function activity_get_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/Create.ex.php b/api/v3/examples/Activity/Create.ex.php index d0afa1ddff..5a39798972 100644 --- a/api/v3/examples/Activity/Create.ex.php +++ b/api/v3/examples/Activity/Create.ex.php @@ -83,6 +83,8 @@ function activity_create_expectedresult() { 'engagement_level' => '', 'weight' => '', 'is_star' => '', + 'created_date' => '', + 'modified_date' => '', ], ], ]; @@ -97,17 +99,17 @@ function activity_create_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/DateTimeHigh.ex.php b/api/v3/examples/Activity/DateTimeHigh.ex.php index 510ccb804e..894484412a 100644 --- a/api/v3/examples/Activity/DateTimeHigh.ex.php +++ b/api/v3/examples/Activity/DateTimeHigh.ex.php @@ -17,6 +17,7 @@ function activity_get_example() { 'source_contact_id' => 1, 'filter.activity_date_time_high' => '20120101000000', 'sequential' => 1, + 'return' => 'activity_date_time', ]; try { @@ -54,20 +55,10 @@ function activity_get_expectedresult() { 'values' => [ '0' => [ 'id' => '1', - 'activity_type_id' => '9999', - 'subject' => 'Make-it-Happen Meeting', 'activity_date_time' => '2011-01-01 00:00:00', - 'duration' => '120', - 'location' => 'Pennsylvania', - 'details' => 'a test activity', - 'status_id' => '1', - 'priority_id' => '1', - 'is_test' => 0, - 'is_auto' => 0, - 'is_current_revision' => '1', - 'is_deleted' => 0, - 'is_star' => 0, 'source_contact_id' => '1', + 'source_contact_name' => 'Mr. Anthony Anderson II', + 'source_contact_sort_name' => 'Anderson, Anthony', ], ], ]; @@ -82,17 +73,17 @@ function activity_get_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/DateTimeLow.ex.php b/api/v3/examples/Activity/DateTimeLow.ex.php index 6e08e95113..fefd5cf63b 100644 --- a/api/v3/examples/Activity/DateTimeLow.ex.php +++ b/api/v3/examples/Activity/DateTimeLow.ex.php @@ -16,6 +16,7 @@ function activity_get_example() { $params = [ 'filter.activity_date_time_low' => '20120101000000', 'sequential' => 1, + 'return' => 'activity_date_time', ]; try { @@ -53,20 +54,10 @@ function activity_get_expectedresult() { 'values' => [ '0' => [ 'id' => '2', - 'activity_type_id' => '9999', - 'subject' => 'Make-it-Happen Meeting', 'activity_date_time' => '2012-02-16 00:00:00', - 'duration' => '120', - 'location' => 'Pennsylvania', - 'details' => 'a test activity', - 'status_id' => '1', - 'priority_id' => '1', - 'is_test' => 0, - 'is_auto' => 0, - 'is_current_revision' => '1', - 'is_deleted' => 0, - 'is_star' => 0, 'source_contact_id' => '1', + 'source_contact_name' => 'Mr. Anthony Anderson II', + 'source_contact_sort_name' => 'Anderson, Anthony', ], ], ]; @@ -81,17 +72,17 @@ function activity_get_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/Delete.ex.php b/api/v3/examples/Activity/Delete.ex.php index 25eaaa610b..fd6ebc4ba8 100644 --- a/api/v3/examples/Activity/Delete.ex.php +++ b/api/v3/examples/Activity/Delete.ex.php @@ -59,17 +59,17 @@ function activity_delete_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/Get.ex.php b/api/v3/examples/Activity/Get.ex.php index 91ea2ed022..e09bac324e 100644 --- a/api/v3/examples/Activity/Get.ex.php +++ b/api/v3/examples/Activity/Get.ex.php @@ -12,9 +12,9 @@ */ function activity_get_example() { $params = [ - 'case_id' => [ - 'IS NULL' => 1, - ], + 'activity_type_id' => 9999, + 'sequential' => 1, + 'return.custom_1' => 1, ]; try { @@ -48,15 +48,18 @@ function activity_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 9, + 'id' => 1, 'values' => [ - '9' => [ - 'id' => '9', - 'activity_type_id' => '2', - 'subject' => 'Ask not what your API can do for you, but what you can do for your API.', - 'activity_date_time' => '2019-08-20 19:10:43', + '0' => [ + 'id' => '1', + 'activity_type_id' => '9999', + 'subject' => 'test activity type id', + 'activity_date_time' => '2011-06-02 14:36:13', + 'duration' => '120', + 'location' => 'Pennsylvania', + 'details' => 'a test activity', 'status_id' => '2', - 'priority_id' => '2', + 'priority_id' => '1', 'is_test' => 0, 'is_auto' => 0, 'is_current_revision' => '1', @@ -64,9 +67,11 @@ function activity_get_expectedresult() { 'is_star' => 0, 'created_date' => '2013-07-28 08:49:19', 'modified_date' => '2012-11-14 16:02:35', - 'source_contact_id' => '19', + 'custom_1' => 'custom string', + 'source_contact_id' => '1', 'source_contact_name' => 'Mr. Anthony Anderson II', 'source_contact_sort_name' => 'Anderson, Anthony', + 'custom_1_1' => 'custom string', ], ], ]; @@ -76,9 +81,9 @@ function activity_get_expectedresult() { /* * This example has been generated from the API test suite. - * The test that created it is called "testGet" + * The test that created it is called "testActivityGetGoodIDCustom" * and can be found at: - * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityCaseTest.php + * 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-Core-Matrix/ diff --git a/api/v3/examples/Activity/GetFields.ex.php b/api/v3/examples/Activity/GetFields.ex.php index 30c0986181..465fa3e4f6 100644 --- a/api/v3/examples/Activity/GetFields.ex.php +++ b/api/v3/examples/Activity/GetFields.ex.php @@ -45,16 +45,21 @@ function activity_getfields_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 29, + 'count' => 31, 'values' => [ 'source_record_id' => [ 'name' => 'source_record_id', 'type' => 1, 'title' => 'Source Record', 'description' => 'Artificial FK to original transaction (e.g. contribution) IF it is not an Activity. Table can be figured out through activity_type_id, and further through component registry.', + 'where' => 'civicrm_activity.source_record_id', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, + 'readonly' => TRUE, + 'add' => '2.0', + 'is_core_field' => TRUE, ], 'activity_type_id' => [ 'name' => 'activity_type_id', @@ -70,8 +75,10 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Select', + 'label' => 'Activity Type', 'size' => 6, 'maxlength' => 14, ], @@ -79,38 +86,51 @@ function activity_getfields_expectedresult() { 'optionGroupName' => 'activity_type', 'optionEditPath' => 'civicrm/admin/options/activity_type', ], + 'add' => '1.1', + 'is_core_field' => TRUE, ], 'activity_date_time' => [ 'name' => 'activity_date_time', 'type' => 12, 'title' => 'Activity Date', 'description' => 'Date and time this activity is scheduled to occur. Formerly named scheduled_date_time.', + 'required' => '', 'import' => TRUE, 'where' => 'civicrm_activity.activity_date_time', 'headerPattern' => '/(activity.)?date(.time$)?/i', 'export' => TRUE, + 'default' => 'CURRENT_TIMESTAMP', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Select Date', - 'format' => 'activityDateTime', + 'formatType' => 'activityDateTime', ], + 'add' => '2.0', + 'is_core_field' => TRUE, + 'api.default' => 'now', ], 'phone_id' => [ 'name' => 'phone_id', 'type' => 1, - 'title' => 'Phone (called) ID', + 'title' => 'Phone ID (called)', 'description' => 'Phone ID of the number called (optional - used if an existing phone number is selected).', + 'where' => 'civicrm_activity.phone_id', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'FKClassName' => 'CRM_Core_DAO_Phone', 'html' => [ 'type' => 'EntityRef', + 'label' => 'Phone (called)', 'size' => 6, 'maxlength' => 14, ], + 'add' => '2.0', + 'is_core_field' => TRUE, 'FKApiName' => 'Phone', ], 'phone_number' => [ @@ -120,23 +140,31 @@ function activity_getfields_expectedresult() { 'description' => 'Phone number in case the number does not exist in the civicrm_phone table.', 'maxlength' => 64, 'size' => 30, + 'where' => 'civicrm_activity.phone_number', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 64, 'size' => 30, ], + 'add' => '2.0', + 'is_core_field' => TRUE, ], 'priority_id' => [ 'name' => 'priority_id', 'type' => 1, 'title' => 'Priority', 'description' => 'ID of the priority given to this activity. Foreign key to civicrm_option_value.', + 'import' => TRUE, + 'where' => 'civicrm_activity.priority_id', + 'export' => TRUE, 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -146,36 +174,60 @@ function activity_getfields_expectedresult() { 'optionGroupName' => 'priority', 'optionEditPath' => 'civicrm/admin/options/priority', ], + 'add' => '2.0', + 'is_core_field' => TRUE, ], 'parent_id' => [ 'name' => 'parent_id', 'type' => 1, - 'title' => 'Parent Activity Id', + 'title' => 'Parent Activity ID', 'description' => 'Parent meeting ID (if this is a follow-up item). This is not currently implemented', + 'where' => 'civicrm_activity.parent_id', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'FKClassName' => 'CRM_Activity_DAO_Activity', + 'html' => [ + 'label' => 'Parent Activity', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '1.1', + 'is_core_field' => TRUE, 'FKApiName' => 'Activity', ], 'is_auto' => [ 'name' => 'is_auto', 'type' => 16, 'title' => 'Auto', + 'where' => 'civicrm_activity.is_auto', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, + 'add' => '2.2', + 'is_core_field' => TRUE, ], 'relationship_id' => [ 'name' => 'relationship_id', 'type' => 1, - 'title' => 'Relationship Id', + 'title' => 'Relationship ID', 'description' => 'FK to Relationship ID', - 'default' => 'NULL', + 'where' => 'civicrm_activity.relationship_id', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Relationship', + 'html' => [ + 'label' => 'Relationship', + 'size' => 6, + 'maxlength' => 14, + ], + 'add' => '2.2', + 'is_core_field' => TRUE, 'FKApiName' => 'Relationship', ], 'is_current_revision' => [ @@ -190,33 +242,42 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', - 'html' => [ - 'type' => 'CheckBox', - ], + 'localizable' => 0, + 'add' => '2.2', + 'is_core_field' => TRUE, ], 'original_id' => [ 'name' => 'original_id', 'type' => 1, - 'title' => 'Original Activity ID ', + 'title' => 'Original Activity ID', 'description' => 'Activity ID of the first activity record in versioning chain.', + 'where' => 'civicrm_activity.original_id', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'FKClassName' => 'CRM_Activity_DAO_Activity', + 'html' => [ + 'label' => 'Original Activity', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '2.2', + 'is_core_field' => TRUE, 'FKApiName' => 'Activity', ], 'weight' => [ 'name' => 'weight', 'type' => 1, 'title' => 'Order', + 'where' => 'civicrm_activity.weight', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', - 'html' => [ - 'type' => 'Text', - 'size' => 6, - 'maxlength' => 14, - ], + 'localizable' => 0, + 'add' => '4.1', + 'is_core_field' => TRUE, ], 'is_star' => [ 'name' => 'is_star', @@ -230,6 +291,12 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, + 'html' => [ + 'type' => 'Checkbox', + ], + 'add' => '4.7', + 'is_core_field' => TRUE, ], 'id' => [ 'name' => 'id', @@ -243,6 +310,15 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '1.1', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_id', 'api.aliases' => [ '0' => 'activity_id', @@ -262,11 +338,14 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 45, ], + 'add' => '1.1', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_subject', ], 'duration' => [ @@ -281,11 +360,14 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ - 'type' => 'Text', + 'type' => 'Number', 'size' => 6, 'maxlength' => 14, ], + 'add' => '2.0', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_duration', ], 'location' => [ @@ -302,11 +384,14 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Text', 'maxlength' => 255, 'size' => 45, ], + 'add' => '1.1', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_location', ], 'details' => [ @@ -321,11 +406,14 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'RichTextEditor', 'rows' => 2, 'cols' => 80, ], + 'add' => '1.1', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_details', ], 'status_id' => [ @@ -336,9 +424,11 @@ function activity_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_activity.status_id', 'headerPattern' => '/(activity.)?status(.label$)?/i', + 'export' => TRUE, 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -348,6 +438,8 @@ function activity_getfields_expectedresult() { 'optionGroupName' => 'activity_status', 'optionEditPath' => 'civicrm/admin/options/activity_status', ], + 'add' => '2.0', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_status_id', 'api.aliases' => [ '0' => 'activity_status', @@ -364,9 +456,12 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ - 'type' => 'Select', + 'type' => 'CheckBox', ], + 'add' => '2.0', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_is_test', ], 'medium_id' => [ @@ -374,10 +469,11 @@ function activity_getfields_expectedresult() { 'type' => 1, 'title' => 'Activity Medium', 'description' => 'Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.', - 'default' => 'NULL', + 'where' => 'civicrm_activity.medium_id', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -387,6 +483,8 @@ function activity_getfields_expectedresult() { 'optionGroupName' => 'encounter_medium', 'optionEditPath' => 'civicrm/admin/options/encounter_medium', ], + 'add' => '2.2', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_medium_id', ], 'result' => [ @@ -396,14 +494,13 @@ function activity_getfields_expectedresult() { 'description' => 'Currently being used to store result id for survey activity, FK to option value.', 'maxlength' => 255, 'size' => 45, + 'where' => 'civicrm_activity.result', 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', - 'html' => [ - 'type' => 'Text', - 'maxlength' => 255, - 'size' => 45, - ], + 'localizable' => 0, + 'add' => '3.3', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_result', ], 'is_deleted' => [ @@ -417,15 +514,18 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ - 'type' => 'Text', + 'type' => 'CheckBox', ], + 'add' => '2.2', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_is_deleted', ], 'campaign_id' => [ 'name' => 'campaign_id', 'type' => 1, - 'title' => 'Campaign', + 'title' => 'Campaign ID', 'description' => 'The campaign for which this activity has been triggered.', 'import' => TRUE, 'where' => 'civicrm_activity.campaign_id', @@ -433,9 +533,12 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'FKClassName' => 'CRM_Campaign_DAO_Campaign', + 'component' => 'CiviCampaign', 'html' => [ - 'type' => 'CheckBox', + 'type' => 'EntityRef', + 'label' => 'Campaign', 'size' => 6, 'maxlength' => 14, ], @@ -443,7 +546,10 @@ function activity_getfields_expectedresult() { 'table' => 'civicrm_campaign', 'keyColumn' => 'id', 'labelColumn' => 'title', + 'prefetch' => 'FALSE', ], + 'add' => '3.4', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_campaign_id', 'FKApiName' => 'Campaign', ], @@ -458,6 +564,7 @@ function activity_getfields_expectedresult() { 'table_name' => 'civicrm_activity', 'entity' => 'Activity', 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, 'html' => [ 'type' => 'Select', 'size' => 6, @@ -467,16 +574,52 @@ function activity_getfields_expectedresult() { 'optionGroupName' => 'engagement_index', 'optionEditPath' => 'civicrm/admin/options/engagement_index', ], + 'add' => '3.4', + 'is_core_field' => TRUE, 'uniqueName' => 'activity_engagement_level', ], - 'source_contact_id' => [ - 'name' => 'source_contact_id', - 'title' => 'Activity Source Contact', - 'description' => 'Person who created this activity. Defaults to current user.', - 'type' => 1, - 'FKClassName' => 'CRM_Contact_DAO_Contact', - 'api.default' => 'user_contact_id', - 'FKApiName' => 'Contact', + 'created_date' => [ + 'name' => 'created_date', + 'type' => 256, + 'title' => 'Created Date', + 'description' => 'When was the activity was created.', + 'required' => '', + 'where' => 'civicrm_activity.created_date', + 'export' => TRUE, + 'default' => 'CURRENT_TIMESTAMP', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, + 'html' => [ + 'type' => 'Select Date', + 'label' => 'Created Date', + ], + 'add' => '4.7', + 'is_core_field' => TRUE, + 'uniqueName' => 'activity_created_date', + ], + 'modified_date' => [ + 'name' => 'modified_date', + 'type' => 256, + 'title' => 'Modified Date', + 'description' => 'When was the activity (or closely related entity) was created or modified or deleted.', + 'required' => '', + 'where' => 'civicrm_activity.modified_date', + 'export' => TRUE, + 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', + 'localizable' => 0, + 'html' => [ + 'type' => 'Select Date', + 'label' => 'Modified Date', + ], + 'readonly' => TRUE, + 'add' => '4.7', + 'is_core_field' => TRUE, + 'uniqueName' => 'activity_modified_date', ], 'assignee_contact_id' => [ 'name' => 'assignee_id', @@ -494,6 +637,16 @@ function activity_getfields_expectedresult() { 'FKClassName' => 'CRM_Contact_DAO_Contact', 'FKApiName' => 'Contact', ], + 'source_contact_id' => [ + 'name' => 'source_contact_id', + 'title' => 'Activity Source Contact', + 'description' => 'Person who created this activity. Defaults to current user.', + 'type' => 1, + 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'api.default' => 'user_contact_id', + 'FKApiName' => 'Contact', + 'api.required' => TRUE, + ], 'case_id' => [ 'name' => 'case_id', 'title' => 'Case ID', @@ -515,17 +668,17 @@ function activity_getfields_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/GetTargetAndAssignee.ex.php b/api/v3/examples/Activity/GetTargetAndAssignee.ex.php new file mode 100644 index 0000000000..f9236211b3 --- /dev/null +++ b/api/v3/examples/Activity/GetTargetAndAssignee.ex.php @@ -0,0 +1,118 @@ + 1, + 'subject' => 'Make-it-Happen Meeting', + 'activity_date_time' => '20110316', + 'duration' => 120, + 'location' => 'Pennsylvania', + 'details' => 'a test activity', + 'status_id' => 1, + 'activity_type_id' => 1, + 'priority_id' => 1, + 'target_contact_id' => 1, + 'assignee_contact_id' => 1, + ]; + + try { + $result = civicrm_api3('Activity', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return [ + 'is_error' => 1, + 'error_message' => $errorMessage, + 'error_code' => $errorCode, + 'error_data' => $errorData, + ]; + } + + return $result; +} + +/** + * Function returns array of result expected from previous function. + * + * @return array + * API result array + */ +function activity_create_expectedresult() { + + $expectedResult = [ + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 1, + 'values' => [ + '1' => [ + 'id' => '1', + 'source_record_id' => '', + 'activity_type_id' => '1', + 'subject' => 'Make-it-Happen Meeting', + 'activity_date_time' => '20110316000000', + 'duration' => '120', + 'location' => 'Pennsylvania', + 'phone_id' => '', + 'phone_number' => '', + 'details' => 'a test activity', + 'status_id' => '1', + 'priority_id' => '1', + 'parent_id' => '', + 'is_test' => '', + 'medium_id' => '', + 'is_auto' => '', + 'relationship_id' => '', + 'is_current_revision' => '', + 'original_id' => '', + 'result' => '', + 'is_deleted' => '', + 'campaign_id' => '', + 'engagement_level' => '', + 'weight' => '', + 'is_star' => '', + 'created_date' => '', + 'modified_date' => '', + ], + ], + ]; + + return $expectedResult; +} + +/* + * This example has been generated from the API test suite. + * The test that created it is called "testActivityReturnTargetAssignee" + * and can be found at: + * 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-Core-Matrix/ + * + * To Learn about the API read + * https://docs.civicrm.org/dev/en/latest/api/ + * + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. + * + * Read more about testing here + * https://docs.civicrm.org/dev/en/latest/testing/ + * + * API Standards documentation: + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ + */ diff --git a/api/v3/examples/Activity/GetTargetandAssigneeName.ex.php b/api/v3/examples/Activity/GetTargetandAssigneeName.ex.php index 385559eb5a..8c40df7603 100644 --- a/api/v3/examples/Activity/GetTargetandAssigneeName.ex.php +++ b/api/v3/examples/Activity/GetTargetandAssigneeName.ex.php @@ -53,8 +53,16 @@ function activity_getsingle_expectedresult() { $expectedResult = [ 'id' => '1', 'subject' => 'Make-it-Happen Meeting', + 'assignee_contact_id' => [], + 'assignee_contact_name' => [ + '5' => 'C Shore', + ], + 'assignee_contact_sort_name' => [ + '5' => 'Shore, C', + ], 'source_contact_id' => '6', 'source_contact_name' => 'D Bug', + 'source_contact_sort_name' => 'Bug, D', 'target_contact_id' => [ '1' => '4', ], @@ -62,9 +70,9 @@ function activity_getsingle_expectedresult() { '3' => 'A Cat', '4' => 'B Good', ], - 'assignee_contact_id' => [], - 'assignee_contact_name' => [ - '5' => 'C Shore', + 'target_contact_sort_name' => [ + '3' => 'Cat, A', + '4' => 'Good, B', ], ]; @@ -78,17 +86,17 @@ function activity_getsingle_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Activity/ReturnAssigneeContact.ex.php b/api/v3/examples/Activity/ReturnAssigneeContact.ex.php index 2eda30494a..1b4ce1121e 100644 --- a/api/v3/examples/Activity/ReturnAssigneeContact.ex.php +++ b/api/v3/examples/Activity/ReturnAssigneeContact.ex.php @@ -20,6 +20,10 @@ function activity_get_example() { 'api.contact.get' => [ 'id' => '$value.source_contact_id', ], + 'return' => [ + '0' => 'activity_type_id', + '1' => 'subject', + ], ]; try { @@ -59,21 +63,18 @@ function activity_get_expectedresult() { 'id' => '1', 'activity_type_id' => '9999', 'subject' => 'test activity type id', - 'activity_date_time' => '2011-06-02 14:36:13', - 'duration' => '120', - 'location' => 'Pennsylvania', - 'details' => 'a test activity', - 'status_id' => '2', - 'priority_id' => '1', - 'is_test' => 0, - 'is_auto' => 0, - 'is_current_revision' => '1', - 'is_deleted' => 0, - 'is_star' => 0, + 'source_contact_id' => '1', + 'source_contact_name' => 'Mr. Anthony Anderson II', + 'source_contact_sort_name' => 'Anderson, Anthony', 'assignee_contact_id' => [ '0' => '3', ], - 'source_contact_id' => '1', + 'assignee_contact_name' => [ + '3' => 'The Rock roccky', + ], + 'assignee_contact_sort_name' => [ + '3' => 'roccky, The Rock', + ], 'api.contact.get' => [ 'is_error' => 0, 'version' => 3, @@ -106,7 +107,7 @@ function activity_get_expectedresult() { 'prefix_id' => '3', 'suffix_id' => '3', 'formal_title' => '', - 'communication_style_id' => '', + 'communication_style_id' => '1', 'job_title' => '', 'gender_id' => '', 'birth_date' => '', @@ -143,7 +144,7 @@ function activity_get_expectedresult() { 'languages' => 'English (United States)', 'individual_prefix' => 'Mr.', 'individual_suffix' => 'II', - 'communication_style' => '', + 'communication_style' => 'Formal', 'gender' => '', 'state_province_name' => '', 'state_province' => '', @@ -166,17 +167,17 @@ function activity_get_expectedresult() { * 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/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ActivityContact/Delete.ex.php b/api/v3/examples/ActivityContact/Delete.ex.php index 0136f30b7c..dba912828e 100644 --- a/api/v3/examples/ActivityContact/Delete.ex.php +++ b/api/v3/examples/ActivityContact/Delete.ex.php @@ -12,7 +12,7 @@ */ function activity_contact_delete_example() { $params = [ - 'id' => 11, + 'id' => 14, ]; try { diff --git a/api/v3/examples/ActivityType/Create.ex.php b/api/v3/examples/ActivityType/Create.ex.php index 390b85e996..43c02fd3c2 100644 --- a/api/v3/examples/ActivityType/Create.ex.php +++ b/api/v3/examples/ActivityType/Create.ex.php @@ -54,10 +54,10 @@ function activity_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 869, + 'id' => 859, 'values' => [ - '869' => [ - 'id' => '869', + '859' => [ + 'id' => '859', 'option_group_id' => '2', 'label' => 'send out letters', 'value' => '55', diff --git a/api/v3/examples/Address/AddressLike.ex.php b/api/v3/examples/Address/AddressLike.ex.php index 4f848d3792..47dc4b85b0 100644 --- a/api/v3/examples/Address/AddressLike.ex.php +++ b/api/v3/examples/Address/AddressLike.ex.php @@ -18,6 +18,7 @@ function address_get_example() { 'LIKE' => '%mb%', ], 'sequential' => 1, + 'return' => 'street_address', ]; try { @@ -51,21 +52,11 @@ function address_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ '0' => [ - 'id' => '1', - 'contact_id' => '4', - 'location_type_id' => '33', - 'is_primary' => '1', - 'is_billing' => 0, + 'id' => '2', 'street_address' => 'Ambachtstraat 23', - 'street_number' => '23', - 'street_name' => 'Ambachtstraat', - 'city' => 'Brummen', - 'postal_code' => '6971 BN', - 'country_id' => '1152', - 'manual_geo_code' => 0, ], ], ]; diff --git a/api/v3/examples/Address/AddressParse.ex.php b/api/v3/examples/Address/AddressParse.ex.php index 283ba200bf..6bac470ffc 100644 --- a/api/v3/examples/Address/AddressParse.ex.php +++ b/api/v3/examples/Address/AddressParse.ex.php @@ -17,7 +17,7 @@ function address_create_example() { 'street_parsing' => 1, 'street_address' => '54A Excelsior Ave. Apt 1C', 'location_type_id' => 8, - 'contact_id' => 4, + 'contact_id' => 3, ]; try { @@ -51,11 +51,11 @@ function address_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ - '1' => [ - 'id' => '1', - 'contact_id' => '4', + '2' => [ + 'id' => '2', + 'contact_id' => '3', 'location_type_id' => '8', 'is_primary' => '1', 'is_billing' => 0, diff --git a/api/v3/examples/Address/AddressSort.ex.php b/api/v3/examples/Address/AddressSort.ex.php index 8efa40edd8..bde3f3d8af 100644 --- a/api/v3/examples/Address/AddressSort.ex.php +++ b/api/v3/examples/Address/AddressSort.ex.php @@ -19,6 +19,7 @@ function address_get_example() { 'limit' => 2, ], 'sequential' => 1, + 'return' => 'street_address', ]; try { @@ -54,32 +55,12 @@ function address_get_expectedresult() { 'count' => 2, 'values' => [ '0' => [ - 'id' => '2', - 'contact_id' => '4', - 'location_type_id' => '31', - 'is_primary' => '1', - 'is_billing' => 0, + 'id' => '3', 'street_address' => 'yzy', - 'street_number' => '23', - 'street_name' => 'Ambachtstraat', - 'city' => 'Brummen', - 'postal_code' => '6971 BN', - 'country_id' => '1152', - 'manual_geo_code' => 0, ], '1' => [ - 'id' => '1', - 'contact_id' => '4', - 'location_type_id' => '31', - 'is_primary' => 0, - 'is_billing' => 0, + 'id' => '2', 'street_address' => 'Ambachtstraat 23', - 'street_number' => '23', - 'street_name' => 'Ambachtstraat', - 'city' => 'Brummen', - 'postal_code' => '6971 BN', - 'country_id' => '1152', - 'manual_geo_code' => 0, ], ], ]; diff --git a/api/v3/examples/Address/Create.ex.php b/api/v3/examples/Address/Create.ex.php index a07644ec4b..d3bacbe11a 100644 --- a/api/v3/examples/Address/Create.ex.php +++ b/api/v3/examples/Address/Create.ex.php @@ -12,7 +12,7 @@ */ function address_create_example() { $params = [ - 'contact_id' => 4, + 'contact_id' => 3, 'street_name' => 'Ambachtstraat', 'street_number' => '23', 'street_address' => 'Ambachtstraat 23', @@ -53,11 +53,11 @@ function address_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ - '1' => [ - 'id' => '1', - 'contact_id' => '4', + '2' => [ + 'id' => '2', + 'contact_id' => '3', 'location_type_id' => '1', 'is_primary' => '1', 'is_billing' => 0, diff --git a/api/v3/examples/Address/Delete.ex.php b/api/v3/examples/Address/Delete.ex.php index 5a6325e8f0..e7e060a02e 100644 --- a/api/v3/examples/Address/Delete.ex.php +++ b/api/v3/examples/Address/Delete.ex.php @@ -12,7 +12,7 @@ */ function address_delete_example() { $params = [ - 'id' => 1, + 'id' => 2, ]; try { diff --git a/api/v3/examples/Address/Get.ex.php b/api/v3/examples/Address/Get.ex.php index 99af38f883..d58398aeea 100644 --- a/api/v3/examples/Address/Get.ex.php +++ b/api/v3/examples/Address/Get.ex.php @@ -12,8 +12,13 @@ */ function address_get_example() { $params = [ - 'contact_id' => 4, + 'contact_id' => 3, 'street_name' => 'Ambachtstraat', + 'return' => [ + '0' => 'location_type_id', + '1' => 'is_primary', + '2' => 'street_address', + ], ]; try { @@ -47,21 +52,13 @@ function address_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ - '1' => [ - 'id' => '1', - 'contact_id' => '4', + '2' => [ + 'id' => '2', 'location_type_id' => '27', 'is_primary' => '1', - 'is_billing' => 0, 'street_address' => 'Ambachtstraat 23', - 'street_number' => '23', - 'street_name' => 'Ambachtstraat', - 'city' => 'Brummen', - 'postal_code' => '6971 BN', - 'country_id' => '1152', - 'manual_geo_code' => 0, ], ], ]; diff --git a/api/v3/examples/Batch/Create.ex.php b/api/v3/examples/Batch/Create.ex.php index 2871983914..08457b0178 100644 --- a/api/v3/examples/Batch/Create.ex.php +++ b/api/v3/examples/Batch/Create.ex.php @@ -17,7 +17,7 @@ function batch_create_example() { 'description' => 'This is description for New Batch 04', 'total' => '400.44', 'item_count' => 4, - 'id' => 3, + 'id' => 5, ]; try { @@ -51,10 +51,10 @@ function batch_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 5, 'values' => [ - '3' => [ - 'id' => '3', + '5' => [ + 'id' => '5', 'name' => 'New_Batch_04', 'title' => 'New Batch 04', 'description' => 'This is description for New Batch 04', diff --git a/api/v3/examples/Batch/Delete.ex.php b/api/v3/examples/Batch/Delete.ex.php index 6e2f03dc88..871e65756c 100644 --- a/api/v3/examples/Batch/Delete.ex.php +++ b/api/v3/examples/Batch/Delete.ex.php @@ -12,7 +12,7 @@ */ function batch_delete_example() { $params = [ - 'id' => 5, + 'id' => 8, ]; try { diff --git a/api/v3/examples/Batch/Get.ex.php b/api/v3/examples/Batch/Get.ex.php index 583d37d163..04a0f42c50 100644 --- a/api/v3/examples/Batch/Get.ex.php +++ b/api/v3/examples/Batch/Get.ex.php @@ -52,6 +52,7 @@ function batch_get_expectedresult() { 'id' => '1', 'name' => 'Batch_433397', 'title' => 'Batch_433397', + 'created_date' => '2013-07-28 08:49:19', 'modified_date' => '2012-11-14 16:02:35', 'status_id' => '1', ], diff --git a/api/v3/examples/Campaign/Delete.ex.php b/api/v3/examples/Campaign/Delete.ex.php index 6a30238d23..81a793590a 100644 --- a/api/v3/examples/Campaign/Delete.ex.php +++ b/api/v3/examples/Campaign/Delete.ex.php @@ -12,7 +12,7 @@ */ function campaign_delete_example() { $params = [ - 'id' => 3, + 'id' => 5, ]; try { diff --git a/api/v3/examples/Campaign/Get.ex.php b/api/v3/examples/Campaign/Get.ex.php index 06b906b680..317e91a14f 100644 --- a/api/v3/examples/Campaign/Get.ex.php +++ b/api/v3/examples/Campaign/Get.ex.php @@ -48,10 +48,10 @@ function campaign_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', + '3' => [ + 'id' => '3', 'name' => 'campaign_title', 'title' => 'campaign title', 'description' => 'Call people, ask for money', diff --git a/api/v3/examples/Contact/APIChainedArray.ex.php b/api/v3/examples/Contact/APIChainedArray.ex.php index 9f516784a0..94a3e62c0c 100644 --- a/api/v3/examples/Contact/APIChainedArray.ex.php +++ b/api/v3/examples/Contact/APIChainedArray.ex.php @@ -109,7 +109,7 @@ function contact_get_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'man3@yahoo.com', 'on_hold' => 0, 'im_id' => '', @@ -135,7 +135,7 @@ function contact_get_expectedresult() { '0' => [ 'id' => '1', 'contact_id' => '3', - 'url' => 'http://civicrm.org', + 'url' => 'https://civicrm.org', ], ], ], @@ -174,6 +174,7 @@ function contact_get_expectedresult() { 'is_test' => 0, 'is_pay_later' => 0, 'contribution_check_number' => '', + 'is_template' => 0, 'financial_account_id' => '1', 'accounting_code' => '4200', 'campaign_id' => '', diff --git a/api/v3/examples/Contact/APIChainedArrayFormats.ex.php b/api/v3/examples/Contact/APIChainedArrayFormats.ex.php index c6065f979e..9590b7aa43 100644 --- a/api/v3/examples/Contact/APIChainedArrayFormats.ex.php +++ b/api/v3/examples/Contact/APIChainedArrayFormats.ex.php @@ -110,7 +110,7 @@ function contact_get_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'man3@yahoo.com', 'on_hold' => 0, 'im_id' => '', @@ -127,7 +127,7 @@ function contact_get_expectedresult() { 'state_province' => '', 'country' => '', 'id' => '3', - 'api.website.getValue' => 'http://civicrm.org', + 'api.website.getValue' => 'https://civicrm.org', 'api.Contribution.getCount' => 2, 'api.CustomValue.get' => [ 'is_error' => 0, @@ -141,7 +141,7 @@ function contact_get_expectedresult() { 'count' => 0, 'values' => [], ], - 'api.Membership.getCount' => 1, + 'api.Membership.getCount' => 0, ], ], ]; diff --git a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.ex.php b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.ex.php index 629a7be3e7..4bfd9fb6cf 100644 --- a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.ex.php +++ b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.ex.php @@ -107,7 +107,7 @@ function contact_get_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'man3@yahoo.com', 'on_hold' => 0, 'im_id' => '', @@ -124,7 +124,7 @@ function contact_get_expectedresult() { 'state_province' => '', 'country' => '', 'id' => '3', - 'api.website.getValue' => 'http://civicrm.org', + 'api.website.getValue' => 'https://civicrm.org', 'api.Contribution.getCount' => 2, 'api.CustomValue.get' => [ 'is_error' => 0, diff --git a/api/v3/examples/Contact/ChainTwoWebsites.ex.php b/api/v3/examples/Contact/ChainTwoWebsites.ex.php index 93d3bf5bfb..a4e5efa7ed 100644 --- a/api/v3/examples/Contact/ChainTwoWebsites.ex.php +++ b/api/v3/examples/Contact/ChainTwoWebsites.ex.php @@ -33,10 +33,10 @@ function contact_create_example() { 'skipCleanMoney' => 1, ], 'api.website.create' => [ - 'url' => 'http://civicrm.org', + 'url' => 'https://civicrm.org', ], 'api.website.create.2' => [ - 'url' => 'http://chained.org', + 'url' => 'https://chained.org', ], ]; @@ -158,8 +158,9 @@ function contact_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', + 'is_template' => '', 'contribution_type_id' => '1', ], ], @@ -173,7 +174,7 @@ function contact_create_expectedresult() { '0' => [ 'id' => '1', 'contact_id' => '3', - 'url' => 'http://civicrm.org', + 'url' => 'https://civicrm.org', 'website_type_id' => '', ], ], @@ -187,7 +188,7 @@ function contact_create_expectedresult() { '0' => [ 'id' => '2', 'contact_id' => '3', - 'url' => 'http://chained.org', + 'url' => 'https://chained.org', 'website_type_id' => '', ], ], diff --git a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.ex.php b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.ex.php index dcacaee069..3a1596a8fe 100644 --- a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.ex.php +++ b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.ex.php @@ -34,10 +34,10 @@ function contact_create_example() { ], 'api.website.create' => [ '0' => [ - 'url' => 'http://civicrm.org', + 'url' => 'https://civicrm.org', ], '1' => [ - 'url' => 'http://chained.org', + 'url' => 'https://chained.org', 'website_type_id' => 2, ], ], @@ -161,8 +161,9 @@ function contact_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', + 'is_template' => '', 'contribution_type_id' => '1', ], ], @@ -177,7 +178,7 @@ function contact_create_expectedresult() { '0' => [ 'id' => '1', 'contact_id' => '3', - 'url' => 'http://civicrm.org', + 'url' => 'https://civicrm.org', 'website_type_id' => '', ], ], @@ -191,7 +192,7 @@ function contact_create_expectedresult() { '0' => [ 'id' => '2', 'contact_id' => '3', - 'url' => 'http://chained.org', + 'url' => 'https://chained.org', 'website_type_id' => '2', ], ], diff --git a/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.ex.php b/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.ex.php index c8fd6e7328..e0eeec276d 100644 --- a/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.ex.php +++ b/api/v3/examples/Contact/ContactIDOfLoggedInUserContactAPI.ex.php @@ -54,8 +54,8 @@ function contact_get_expectedresult() { 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', - 'sort_name' => 'User 202290815, Logged In', - 'display_name' => 'Mr. Logged In User 202290815 II', + 'sort_name' => 'User 707727958, Logged In', + 'display_name' => 'Mr. Logged In User 707727958 II', 'do_not_email' => 0, 'do_not_phone' => 0, 'do_not_mail' => 0, @@ -72,7 +72,7 @@ function contact_get_expectedresult() { 'preferred_mail_format' => 'Both', 'first_name' => 'Logged In', 'middle_name' => 'J.', - 'last_name' => 'User 202290815', + 'last_name' => 'User 707727958', 'prefix_id' => '3', 'suffix_id' => '3', 'formal_title' => '', @@ -102,7 +102,7 @@ function contact_get_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'anthony_anderson@civicrm.org', 'on_hold' => 0, 'im_id' => '', diff --git a/api/v3/examples/Contact/CreateParticipantPayment.ex.php b/api/v3/examples/Contact/CreateParticipantPayment.ex.php index a4d7ed26e0..ba7bc66314 100644 --- a/api/v3/examples/Contact/CreateParticipantPayment.ex.php +++ b/api/v3/examples/Contact/CreateParticipantPayment.ex.php @@ -8,7 +8,7 @@ * Test Generated example demonstrating the Contact.create API. * * Single function to create contact with partipation & contribution. - * Note that in the case of 'contribution' the 'create' is implied (api.contribution.create) + * Note that in the case of 'contribution' the 'create' is implied (api.contribution.create). * * @return array * API result array @@ -18,7 +18,7 @@ function contact_create_example() { 'contact_type' => 'Individual', 'display_name' => 'dlobo', 'api.participant' => [ - 'event_id' => 43, + 'event_id' => 41, 'status_id' => 1, 'role_id' => 1, 'format.only_id' => 1, @@ -65,10 +65,10 @@ function contact_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 5, + 'id' => 7, 'values' => [ - '5' => [ - 'id' => '5', + '7' => [ + 'id' => '7', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'do_not_email' => 0, diff --git a/api/v3/examples/Contact/Get.ex.php b/api/v3/examples/Contact/Get.ex.php index fa0d595b10..9e52194dcc 100644 --- a/api/v3/examples/Contact/Get.ex.php +++ b/api/v3/examples/Contact/Get.ex.php @@ -100,7 +100,7 @@ function contact_get_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'man2@yahoo.com', 'on_hold' => 0, 'im_id' => '', diff --git a/api/v3/examples/Contact/GetFieldsOptions.ex.php b/api/v3/examples/Contact/GetFieldsOptions.ex.php index ad825283f4..1177b68ca4 100644 --- a/api/v3/examples/Contact/GetFieldsOptions.ex.php +++ b/api/v3/examples/Contact/GetFieldsOptions.ex.php @@ -66,6 +66,13 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'contact_id', @@ -80,6 +87,7 @@ function contact_getfields_expectedresult() { 'size' => 30, 'where' => 'civicrm_contact.contact_type', 'export' => TRUE, + 'contactType' => '', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -95,6 +103,8 @@ function contact_getfields_expectedresult() { 'labelColumn' => 'label', 'condition' => 'parent_id IS NULL', ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => 1, ], @@ -125,6 +135,7 @@ function contact_getfields_expectedresult() { 'labelColumn' => 'label', 'condition' => 'parent_id IS NOT NULL', ], + 'add' => '1.5', 'is_core_field' => TRUE, ], 'do_not_email' => [ @@ -142,7 +153,9 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Do Not Email', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'do_not_phone' => [ @@ -160,7 +173,9 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Do Not Phone', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'do_not_mail' => [ @@ -178,7 +193,9 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Do Not Mail', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'do_not_sms' => [ @@ -196,7 +213,9 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Do Not Sms', ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'do_not_trade' => [ @@ -214,7 +233,9 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Do Not Trade', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'is_opt_out' => [ @@ -232,7 +253,9 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Is Opt Out', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'legal_identifier' => [ @@ -253,9 +276,11 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Legal Identifier', 'maxlength' => 32, 'size' => 20, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'external_identifier' => [ @@ -276,9 +301,11 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'External Identifier', 'maxlength' => 64, 'size' => 8, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'sort_name' => [ @@ -299,6 +326,8 @@ function contact_getfields_expectedresult() { 'maxlength' => 128, 'size' => 30, ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, ], 'display_name' => [ @@ -319,6 +348,8 @@ function contact_getfields_expectedresult() { 'maxlength' => 128, 'size' => 30, ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, ], 'nick_name' => [ @@ -342,6 +373,7 @@ function contact_getfields_expectedresult() { 'maxlength' => 128, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'legal_name' => [ @@ -355,15 +387,18 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.legal_name', 'headerPattern' => '/^legal|(l(egal\\s)?name)$/i', 'export' => TRUE, + 'contactType' => 'Organization', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Legal Name', 'maxlength' => 128, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'image_URL' => [ @@ -380,9 +415,11 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'File', + 'label' => 'Image URL', 'rows' => 2, 'cols' => 80, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'preferred_communication_method' => [ @@ -411,6 +448,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'preferred_communication_method', 'optionEditPath' => 'civicrm/admin/options/preferred_communication_method', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'preferred_language' => [ @@ -438,6 +476,7 @@ function contact_getfields_expectedresult() { 'keyColumn' => 'name', 'optionEditPath' => 'civicrm/admin/options/languages', ], + 'add' => '3.2', 'is_core_field' => TRUE, ], 'preferred_mail_format' => [ @@ -458,12 +497,14 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Select', + 'label' => 'Preferred Mail Format', 'maxlength' => 8, 'size' => 8, ], 'pseudoconstant' => [ 'callback' => 'CRM_Core_SelectValues::pmf', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'hash' => [ @@ -479,6 +520,8 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, ], 'api_key' => [ @@ -499,6 +542,13 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'html' => [ + 'label' => 'API KEY', + 'maxlength' => 32, + 'size' => 20, + ], + 'readonly' => TRUE, + 'add' => '2.2', 'is_core_field' => TRUE, ], 'first_name' => [ @@ -513,15 +563,18 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^first|(f(irst\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'First Name', 'maxlength' => 64, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'middle_name' => [ @@ -536,15 +589,18 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^middle|(m(iddle\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Middle Name', 'maxlength' => 64, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'last_name' => [ @@ -559,15 +615,18 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^last|(l(ast\\s)?name)$/i', 'dataPattern' => '/^\\w+(\\s\\w+)?+$/', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Last Name', 'maxlength' => 64, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'prefix_id' => [ @@ -580,6 +639,7 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^(prefix|title)/i', 'dataPattern' => '/^(mr|ms|mrs|sir|dr)\\.?$/i', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -593,6 +653,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'individual_prefix', 'optionEditPath' => 'civicrm/admin/options/individual_prefix', ], + 'add' => '1.2', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'individual_prefix', @@ -609,6 +670,7 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^suffix$/i', 'dataPattern' => '/^(sr|jr)\\.?|i{2,}$/', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -622,6 +684,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'individual_suffix', 'optionEditPath' => 'civicrm/admin/options/individual_suffix', ], + 'add' => '1.2', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'individual_suffix', @@ -639,15 +702,18 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.formal_title', 'headerPattern' => '/^title/i', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Formal Title', 'maxlength' => 64, 'size' => 30, ], + 'add' => '4.5', 'is_core_field' => TRUE, ], 'communication_style_id' => [ @@ -655,7 +721,9 @@ function contact_getfields_expectedresult() { 'type' => 1, 'title' => 'Communication Style', 'description' => 'Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.', + 'import' => TRUE, 'where' => 'civicrm_contact.communication_style_id', + 'headerPattern' => '/style/i', 'export' => TRUE, 'table_name' => 'civicrm_contact', 'entity' => 'Contact', @@ -670,6 +738,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'communication_style', 'optionEditPath' => 'civicrm/admin/options/communication_style', ], + 'add' => '4.4', 'is_core_field' => TRUE, ], 'email_greeting_id' => [ @@ -683,10 +752,16 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'html' => [ + 'type' => 'Select', + 'size' => 6, + 'maxlength' => 14, + ], 'pseudoconstant' => [ 'optionGroupName' => 'email_greeting', 'optionEditPath' => 'civicrm/admin/options/email_greeting', ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'email_greeting_custom' => [ @@ -704,9 +779,11 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Email Greeting Custom', 'maxlength' => 128, 'size' => 45, ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'email_greeting_display' => [ @@ -721,11 +798,8 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, - 'html' => [ - 'type' => 'Text', - 'maxlength' => 255, - 'size' => 45, - ], + 'readonly' => TRUE, + 'add' => '3.0', 'is_core_field' => TRUE, ], 'postal_greeting_id' => [ @@ -740,7 +814,7 @@ function contact_getfields_expectedresult() { 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ - 'type' => 'Text', + 'type' => 'Select', 'size' => 6, 'maxlength' => 14, ], @@ -748,6 +822,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'postal_greeting', 'optionEditPath' => 'civicrm/admin/options/postal_greeting', ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'postal_greeting_custom' => [ @@ -765,9 +840,11 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Postal Greeting Custom', 'maxlength' => 128, 'size' => 45, ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'postal_greeting_display' => [ @@ -782,11 +859,8 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, - 'html' => [ - 'type' => 'Text', - 'maxlength' => 255, - 'size' => 45, - ], + 'readonly' => TRUE, + 'add' => '3.0', 'is_core_field' => TRUE, ], 'addressee_id' => [ @@ -800,10 +874,16 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'html' => [ + 'type' => 'Select', + 'size' => 6, + 'maxlength' => 14, + ], 'pseudoconstant' => [ 'optionGroupName' => 'addressee', 'optionEditPath' => 'civicrm/admin/options/addressee', ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'addressee_custom' => [ @@ -821,9 +901,11 @@ function contact_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Addressee Custom', 'maxlength' => 128, 'size' => 45, ], + 'add' => '3.0', 'is_core_field' => TRUE, ], 'addressee_display' => [ @@ -838,11 +920,8 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, - 'html' => [ - 'type' => 'Text', - 'maxlength' => 255, - 'size' => 45, - ], + 'readonly' => TRUE, + 'add' => '3.0', 'is_core_field' => TRUE, ], 'job_title' => [ @@ -857,32 +936,37 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^job|(j(ob\\s)?title)$/i', 'dataPattern' => '//', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Job Title', 'maxlength' => 255, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'gender_id' => [ 'name' => 'gender_id', 'type' => 1, - 'title' => 'Gender', + 'title' => 'Gender ID', 'description' => 'FK to gender ID', 'import' => TRUE, 'where' => 'civicrm_contact.gender_id', 'headerPattern' => '/^gender$/i', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Select', + 'label' => 'Gender', 'size' => 6, 'maxlength' => 14, ], @@ -890,6 +974,7 @@ function contact_getfields_expectedresult() { 'optionGroupName' => 'gender', 'optionEditPath' => 'civicrm/admin/options/gender', ], + 'add' => '1.2', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'gender', @@ -905,6 +990,7 @@ 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, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -912,24 +998,30 @@ function contact_getfields_expectedresult() { 'html' => [ 'type' => 'Select Date', 'formatType' => 'birth', + 'label' => 'Birth Date', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'is_deceased' => [ 'name' => 'is_deceased', 'type' => 16, 'title' => 'Deceased', + 'required' => TRUE, 'import' => TRUE, 'where' => 'civicrm_contact.is_deceased', 'headerPattern' => '/i(s\\s)?d(eceased)$/i', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'CheckBox', + 'label' => 'Is Deceased', ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'deceased_date' => [ @@ -941,6 +1033,7 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.deceased_date', 'headerPattern' => '/^deceased|(d(eceased\\s)?date)$/i', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -948,7 +1041,9 @@ function contact_getfields_expectedresult() { 'html' => [ 'type' => 'Select Date', 'formatType' => 'birth', + 'label' => 'Deceased Date', ], + 'add' => '1.5', 'is_core_field' => TRUE, ], 'household_name' => [ @@ -963,15 +1058,18 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^household|(h(ousehold\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'contactType' => 'Household', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Household Name', 'maxlength' => 128, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'primary_contact_id' => [ @@ -980,16 +1078,19 @@ function contact_getfields_expectedresult() { 'title' => 'Household Primary Contact ID', 'description' => 'Optional FK to Primary Contact for this household.', 'where' => 'civicrm_contact.primary_contact_id', + 'contactType' => 'Household', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', 'html' => [ - 'type' => 'Select', + 'label' => 'Household Primary Contact', 'size' => 6, 'maxlength' => 14, ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], @@ -1005,15 +1106,18 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^organization|(o(rganization\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'contactType' => 'Organization', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Organization Name', 'maxlength' => 128, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'sic_code' => [ @@ -1027,15 +1131,18 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.sic_code', 'headerPattern' => '/^sic|(s(ic\\s)?code)$/i', 'export' => TRUE, + 'contactType' => 'Organization', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'SIC Code', 'maxlength' => 8, 'size' => 8, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'user_unique_id' => [ @@ -1060,6 +1167,7 @@ function contact_getfields_expectedresult() { 'maxlength' => 255, 'size' => 45, ], + 'add' => '2.0', 'is_core_field' => TRUE, ], 'created_date' => [ @@ -1070,11 +1178,14 @@ function contact_getfields_expectedresult() { 'required' => '', 'where' => 'civicrm_contact.created_date', 'export' => TRUE, - 'default' => 'NULL', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'html' => [ + 'label' => 'Created Date', + ], + 'add' => '4.3', 'is_core_field' => TRUE, ], 'modified_date' => [ @@ -1090,6 +1201,11 @@ function contact_getfields_expectedresult() { 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, + 'html' => [ + 'label' => 'Modified Date', + ], + 'readonly' => TRUE, + 'add' => '4.3', 'is_core_field' => TRUE, ], 'source' => [ @@ -1112,16 +1228,18 @@ function contact_getfields_expectedresult() { 'maxlength' => 255, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'uniqueName' => 'contact_source', ], 'employer_id' => [ 'name' => 'employer_id', 'type' => 1, - 'title' => 'Current Employer', + 'title' => 'Current Employer ID', 'description' => 'OPTIONAL FK to civicrm_contact record.', 'where' => 'civicrm_contact.employer_id', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'Contact', 'bao' => 'CRM_Contact_BAO_Contact', @@ -1129,9 +1247,11 @@ function contact_getfields_expectedresult() { 'FKClassName' => 'CRM_Contact_DAO_Contact', 'html' => [ 'type' => 'EntityRef', + 'label' => 'Current Employer', 'size' => 6, 'maxlength' => 14, ], + 'add' => '2.1', 'is_core_field' => TRUE, 'uniqueName' => 'current_employer_id', 'FKApiName' => 'Contact', @@ -1150,6 +1270,7 @@ function contact_getfields_expectedresult() { 'html' => [ 'type' => 'CheckBox', ], + 'add' => '3.2', 'is_core_field' => TRUE, 'uniqueName' => 'contact_is_deleted', ], @@ -1174,18 +1295,19 @@ function contact_getfields_expectedresult() { 'extends_entity_column_id' => '', 'is_view' => 0, 'is_multiple' => 0, - 'option_group_id' => '110', + 'option_group_id' => '109', 'date_format' => '', 'time_format' => '', 'is_required' => '1', 'table_name' => 'civicrm_value_select_test_g_1', 'column_name' => 'our_special_field_1', + 'serialize' => 0, 'where' => 'civicrm_value_select_test_g_1.our_special_field_1', 'extends_table' => 'civicrm_contact', 'search_table' => 'contact_a', 'pseudoconstant' => [ - 'optionGroupName' => 'our_special_field_20190820191605', - 'optionEditPath' => 'civicrm/admin/options/our_special_field_20190820191605', + 'optionGroupName' => 'our_special_field_20220117122549', + 'optionEditPath' => 'civicrm/admin/options/our_special_field_20220117122549', ], 'options' => [ '1' => 'Label1', diff --git a/api/v3/examples/Contact/GetSingleContact.ex.php b/api/v3/examples/Contact/GetSingleContact.ex.php index 22e2bbc90c..3992b4b438 100644 --- a/api/v3/examples/Contact/GetSingleContact.ex.php +++ b/api/v3/examples/Contact/GetSingleContact.ex.php @@ -98,7 +98,7 @@ function contact_getsingle_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'anthony_anderson@civicrm.org', 'on_hold' => 0, 'im_id' => '', diff --git a/api/v3/examples/Contact/GroupFilterUsingContactAPI.ex.php b/api/v3/examples/Contact/GroupFilterUsingContactAPI.ex.php index 6fd63dd47d..4e21725d1b 100644 --- a/api/v3/examples/Contact/GroupFilterUsingContactAPI.ex.php +++ b/api/v3/examples/Contact/GroupFilterUsingContactAPI.ex.php @@ -59,8 +59,8 @@ function contact_get_expectedresult() { 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', - 'sort_name' => 'Groupmember, Test2', - 'display_name' => 'Test2 Groupmember', + 'sort_name' => 'Group member, Test2', + 'display_name' => 'Test2 Group member', 'do_not_email' => 0, 'do_not_phone' => 0, 'do_not_mail' => 0, @@ -77,7 +77,7 @@ function contact_get_expectedresult() { 'preferred_mail_format' => 'Both', 'first_name' => 'Test2', 'middle_name' => '', - 'last_name' => 'Groupmember', + 'last_name' => 'Group member', 'prefix_id' => '', 'suffix_id' => '', 'formal_title' => '', @@ -107,7 +107,7 @@ function contact_get_expectedresult() { 'phone_id' => '', 'phone_type_id' => '', 'phone' => '', - 'email_id' => '1', + 'email_id' => '3', 'email' => 'test@example.org', 'on_hold' => 0, 'im_id' => '', diff --git a/api/v3/examples/Contact/NestedReplaceEmail.ex.php b/api/v3/examples/Contact/NestedReplaceEmail.ex.php index 97447a5537..8b443f1993 100644 --- a/api/v3/examples/Contact/NestedReplaceEmail.ex.php +++ b/api/v3/examples/Contact/NestedReplaceEmail.ex.php @@ -154,7 +154,7 @@ function contact_get_expectedresult() { 'count' => 5, 'values' => [ '0' => [ - 'id' => '19', + 'id' => '35', 'contact_id' => '19', 'location_type_id' => '38', 'email' => '1-1@example.com', @@ -168,7 +168,7 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '1' => [ - 'id' => '20', + 'id' => '36', 'contact_id' => '19', 'location_type_id' => '38', 'email' => '1-2@example.com', @@ -182,7 +182,7 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '2' => [ - 'id' => '21', + 'id' => '37', 'contact_id' => '19', 'location_type_id' => '38', 'email' => '1-3@example.com', @@ -196,7 +196,7 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '3' => [ - 'id' => '22', + 'id' => '38', 'contact_id' => '19', 'location_type_id' => '39', 'email' => '2-1@example.com', @@ -210,7 +210,7 @@ function contact_get_expectedresult() { 'signature_html' => '', ], '4' => [ - 'id' => '23', + 'id' => '39', 'contact_id' => '19', 'location_type_id' => '39', 'email' => '2-2@example.com', diff --git a/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.ex.php b/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.ex.php index e67c8d1de2..8492f774c5 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.ex.php +++ b/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.ex.php @@ -14,7 +14,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 32, + 'contact_id' => 3, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -23,7 +23,7 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'honor_contact_id' => 33, + 'honor_contact_id' => 4, ]; try { @@ -61,7 +61,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '32', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -88,7 +88,7 @@ function contribution_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', 'is_template' => '', 'contribution_type_id' => '1', diff --git a/api/v3/examples/Contribution/ContributionCreateWithNote.ex.php b/api/v3/examples/Contribution/ContributionCreateWithNote.ex.php index 719872e73e..b0b2726779 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithNote.ex.php +++ b/api/v3/examples/Contribution/ContributionCreateWithNote.ex.php @@ -14,7 +14,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 26, + 'contact_id' => 3, 'receive_date' => '2012-01-01', 'total_amount' => '100', 'financial_type_id' => 1, @@ -64,7 +64,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '26', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -91,7 +91,7 @@ function contribution_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', 'is_template' => '', 'contribution_type_id' => '1', diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.ex.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.ex.php index 0b8e56397c..e6a60601cf 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.ex.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.ex.php @@ -14,7 +14,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 28, + 'contact_id' => 3, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -25,7 +25,7 @@ function contribution_create_example() { 'contribution_status_id' => 1, 'soft_credit' => [ '1' => [ - 'contact_id' => 29, + 'contact_id' => 4, 'amount' => 50, 'soft_credit_type_id' => 3, ], @@ -67,7 +67,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '28', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -94,7 +94,7 @@ function contribution_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', 'is_template' => '', 'contribution_type_id' => '1', diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.ex.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.ex.php index 528f18d9cb..86686dbd23 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.ex.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.ex.php @@ -14,7 +14,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 30, + 'contact_id' => 3, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -23,7 +23,7 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'soft_credit_to' => 31, + 'soft_credit_to' => 4, ]; try { @@ -61,7 +61,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '30', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -88,7 +88,7 @@ function contribution_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', 'is_template' => '', 'contribution_type_id' => '1', diff --git a/api/v3/examples/Contribution/Create.ex.php b/api/v3/examples/Contribution/Create.ex.php index 2eabdfd2d5..557102d48c 100644 --- a/api/v3/examples/Contribution/Create.ex.php +++ b/api/v3/examples/Contribution/Create.ex.php @@ -12,7 +12,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 1, + 'contact_id' => 3, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -21,7 +21,7 @@ function contribution_create_example() { 'is_pay_later' => 1, 'invoice_id' => 67890, 'source' => 'SSF', - 'contribution_status_id' => 2, + 'contribution_status_id' => 'Pending', ]; try { @@ -59,7 +59,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '1', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '1', 'payment_instrument_id' => '4', diff --git a/api/v3/examples/Contribution/CreateWithNestedLineItems.ex.php b/api/v3/examples/Contribution/CreateWithNestedLineItems.ex.php index 193e39e77f..efdc4e3b05 100644 --- a/api/v3/examples/Contribution/CreateWithNestedLineItems.ex.php +++ b/api/v3/examples/Contribution/CreateWithNestedLineItems.ex.php @@ -14,7 +14,7 @@ */ function contribution_create_example() { $params = [ - 'contact_id' => 13, + 'contact_id' => 3, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -25,7 +25,7 @@ function contribution_create_example() { 'trxn_id' => 12345, 'invoice_id' => 67890, 'source' => 'SSF', - 'contribution_status_id' => 1, + 'contribution_status_id' => 'Pending', 'skipLineItem' => 1, 'api.line_item.create' => [ '0' => [ @@ -78,7 +78,7 @@ function contribution_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '13', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -100,7 +100,7 @@ function contribution_create_expectedresult() { 'contribution_recur_id' => '', 'is_test' => '', 'is_pay_later' => '', - 'contribution_status_id' => '1', + 'contribution_status_id' => '2', 'address_id' => '', 'check_number' => '', 'campaign_id' => '', @@ -131,6 +131,7 @@ function contribution_create_expectedresult() { 'financial_type_id' => '', 'non_deductible_amount' => '', 'tax_amount' => '', + 'membership_num_terms' => '', ], ], ], @@ -155,6 +156,7 @@ function contribution_create_expectedresult() { 'financial_type_id' => '', 'non_deductible_amount' => '', 'tax_amount' => '', + 'membership_num_terms' => '', ], ], ], diff --git a/api/v3/examples/Contribution/Get.ex.php b/api/v3/examples/Contribution/Get.ex.php index d0ddd03c96..28fd89ea34 100644 --- a/api/v3/examples/Contribution/Get.ex.php +++ b/api/v3/examples/Contribution/Get.ex.php @@ -13,6 +13,21 @@ function contribution_get_example() { $params = [ 'contribution_id' => 1, + 'return' => [ + '0' => 'invoice_number', + '1' => 'contribution_source', + '2' => 'contact_id', + '3' => 'receive_date', + '4' => 'total_amount', + '5' => 'financial_type_id', + '6' => 'non_deductible_amount', + '7' => 'fee_amount', + '8' => 'net_amount', + '9' => 'trxn_id', + '10' => 'invoice_id', + '11' => 'source', + '12' => 'contribution_status_id', + ], ]; try { @@ -50,16 +65,10 @@ function contribution_get_expectedresult() { 'values' => [ '1' => [ 'contact_id' => '3', - 'contact_type' => 'Individual', - 'contact_sub_type' => '', - 'sort_name' => 'Anderson, Anthony', - 'display_name' => 'Mr. Anthony Anderson II', - 'contribution_id' => '1', - 'currency' => 'USD', 'contribution_recur_id' => '', 'contribution_status_id' => '1', - 'contribution_campaign_id' => '', - 'payment_instrument_id' => '4', + 'contribution_id' => '1', + 'financial_type_id' => '1', 'receive_date' => '2010-01-20 00:00:00', 'non_deductible_amount' => '10.00', 'total_amount' => '100.00', @@ -68,29 +77,9 @@ function contribution_get_expectedresult() { 'trxn_id' => '23456', 'invoice_id' => '78910', 'invoice_number' => 'INV_1', - 'contribution_cancel_date' => '', - 'cancel_reason' => '', - 'receipt_date' => '', - 'thankyou_date' => '', 'contribution_source' => 'SSF', - 'amount_level' => '', - 'is_test' => 0, - 'is_pay_later' => 0, - 'contribution_check_number' => '', - 'financial_account_id' => '1', - 'accounting_code' => '4200', - 'campaign_id' => '', - 'contribution_campaign_title' => '', - 'financial_type_id' => '1', - 'financial_type' => 'Donation', - 'contribution_note' => '', - 'contribution_batch' => '', 'contribution_recur_status' => 'Completed', - 'payment_instrument' => 'Check', 'contribution_status' => 'Completed', - 'check_number' => '', - 'instrument_id' => '4', - 'cancel_date' => '', 'id' => '1', 'contribution_type_id' => '1', ], diff --git a/api/v3/examples/ContributionPage/Create.ex.php b/api/v3/examples/ContributionPage/Create.ex.php index 6db0cd1e9d..e795e70212 100644 --- a/api/v3/examples/ContributionPage/Create.ex.php +++ b/api/v3/examples/ContributionPage/Create.ex.php @@ -17,6 +17,7 @@ function contribution_page_create_example() { 'currency' => 'NZD', 'goal_amount' => 34567, 'is_pay_later' => 1, + 'pay_later_text' => 'Send check', 'is_monetary' => TRUE, 'is_email_receipt' => TRUE, 'receipt_from_email' => 'yourconscience@donate.com', @@ -71,7 +72,7 @@ function contribution_page_create_expectedresult() { 'is_recur_installments' => '', 'adjust_recur_start_date' => '', 'is_pay_later' => '1', - 'pay_later_text' => '', + 'pay_later_text' => 'Send check', 'pay_later_receipt' => '', 'is_partial_payment' => '', 'initial_amount_label' => '', @@ -102,6 +103,7 @@ function contribution_page_create_expectedresult() { 'campaign_id' => '', 'is_share' => '', 'is_billing_required' => '', + 'frontend_title' => '', 'contribution_type_id' => '1', ], ], @@ -112,9 +114,9 @@ function contribution_page_create_expectedresult() { /* * This example has been generated from the API test suite. - * The test that created it is called "testCreateContributionPage" + * The test that created it is called "basicCreateTest" * and can be found at: - * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php + * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CiviUnitTestCase.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ diff --git a/api/v3/examples/ContributionPage/Delete.ex.php b/api/v3/examples/ContributionPage/Delete.ex.php index ca2f93aab8..831bbafc71 100644 --- a/api/v3/examples/ContributionPage/Delete.ex.php +++ b/api/v3/examples/ContributionPage/Delete.ex.php @@ -54,9 +54,9 @@ function contribution_page_delete_expectedresult() { /* * This example has been generated from the API test suite. - * The test that created it is called "testDeleteContributionPage" + * The test that created it is called "basicDeleteTest" * and can be found at: - * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php + * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CiviUnitTestCase.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ diff --git a/api/v3/examples/ContributionPage/Get.ex.php b/api/v3/examples/ContributionPage/Get.ex.php index d9e613c6aa..bfc747f45c 100644 --- a/api/v3/examples/ContributionPage/Get.ex.php +++ b/api/v3/examples/ContributionPage/Get.ex.php @@ -61,6 +61,7 @@ function contribution_page_get_expectedresult() { 'is_recur_installments' => 0, 'adjust_recur_start_date' => 0, 'is_pay_later' => '1', + 'pay_later_text' => 'Send check', 'is_partial_payment' => 0, 'is_allow_other_amount' => 0, 'goal_amount' => '34567.00', diff --git a/api/v3/examples/ContributionPage/Submit.ex.php b/api/v3/examples/ContributionPage/Submit.ex.php index cf7a92bf0c..1b3f68bd3c 100644 --- a/api/v3/examples/ContributionPage/Submit.ex.php +++ b/api/v3/examples/ContributionPage/Submit.ex.php @@ -7,7 +7,7 @@ /** * Test Generated example demonstrating the ContributionPage.submit API. * - * Submit contribution page. + * submit contribution page. * * @return array * API result array @@ -18,6 +18,7 @@ function contribution_page_submit_example() { 'pledge_amount' => [ '2' => 1, ], + 'price_2' => 3, 'billing_first_name' => 'Billy', 'billing_middle_name' => 'Goat', 'billing_last_name' => 'Gruff', @@ -33,7 +34,6 @@ function contribution_page_submit_example() { 'pledge_id' => '1', 'cid' => '4', 'contact_id' => '4', - 'amount' => '100', 'is_pledge' => TRUE, 'pledge_block_id' => 1, ]; diff --git a/api/v3/examples/ContributionRecur/Create.ex.php b/api/v3/examples/ContributionRecur/Create.ex.php index 0fe469e2bf..6843dbf101 100644 --- a/api/v3/examples/ContributionRecur/Create.ex.php +++ b/api/v3/examples/ContributionRecur/Create.ex.php @@ -15,7 +15,7 @@ function contribution_recur_create_example() { 'contact_id' => 3, 'installments' => '12', 'frequency_interval' => '1', - 'amount' => '500', + 'amount' => '500.00', 'contribution_status_id' => 1, 'start_date' => '2012-01-01 00:00:00', 'currency' => 'USD', @@ -58,7 +58,7 @@ function contribution_recur_create_expectedresult() { '1' => [ 'id' => '1', 'contact_id' => '3', - 'amount' => '500', + 'amount' => '500.00', 'currency' => 'USD', 'frequency_unit' => 'day', 'frequency_interval' => '1', @@ -94,9 +94,9 @@ function contribution_recur_create_expectedresult() { /* * This example has been generated from the API test suite. - * The test that created it is called "testCreateContributionRecur" + * The test that created it is called "basicCreateTest" * and can be found at: - * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php + * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CiviUnitTestCase.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ diff --git a/api/v3/examples/ContributionRecur/Delete.ex.php b/api/v3/examples/ContributionRecur/Delete.ex.php index 5adcdc38e4..8f36284965 100644 --- a/api/v3/examples/ContributionRecur/Delete.ex.php +++ b/api/v3/examples/ContributionRecur/Delete.ex.php @@ -12,7 +12,7 @@ */ function contribution_recur_delete_example() { $params = [ - 'id' => 4, + 'id' => 7, ]; try { @@ -54,9 +54,9 @@ function contribution_recur_delete_expectedresult() { /* * This example has been generated from the API test suite. - * The test that created it is called "testDeleteContributionRecur" + * The test that created it is called "basicDeleteTest" * and can be found at: - * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionRecurTest.php + * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/CiviUnitTestCase.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ diff --git a/api/v3/examples/ContributionRecur/Get.ex.php b/api/v3/examples/ContributionRecur/Get.ex.php index 5fac58b698..38caa084ea 100644 --- a/api/v3/examples/ContributionRecur/Get.ex.php +++ b/api/v3/examples/ContributionRecur/Get.ex.php @@ -46,11 +46,11 @@ function contribution_recur_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', - 'contact_id' => '4', + '3' => [ + 'id' => '3', + 'contact_id' => '5', 'amount' => '500.00', 'currency' => 'USD', 'frequency_unit' => 'day', diff --git a/api/v3/examples/Country/Create.ex.php b/api/v3/examples/Country/Create.ex.php index 4b9778af14..9897b2c57f 100644 --- a/api/v3/examples/Country/Create.ex.php +++ b/api/v3/examples/Country/Create.ex.php @@ -48,10 +48,10 @@ function country_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1254, + 'id' => 1255, 'values' => [ - '1254' => [ - 'id' => '1254', + '1255' => [ + 'id' => '1255', 'name' => 'Made Up Land', 'iso_code' => 'ZZ', 'country_code' => '', @@ -60,6 +60,7 @@ function country_create_expectedresult() { 'ndd_prefix' => '', 'region_id' => '1', 'is_province_abbreviated' => '', + 'is_active' => '', ], ], ]; diff --git a/api/v3/examples/Country/Delete.ex.php b/api/v3/examples/Country/Delete.ex.php index c5778b5978..07c01d631a 100644 --- a/api/v3/examples/Country/Delete.ex.php +++ b/api/v3/examples/Country/Delete.ex.php @@ -12,7 +12,7 @@ */ function country_delete_example() { $params = [ - 'id' => 1255, + 'id' => 1257, ]; try { diff --git a/api/v3/examples/Country/Get.ex.php b/api/v3/examples/Country/Get.ex.php index de62cbf66c..bef86bf4a9 100644 --- a/api/v3/examples/Country/Get.ex.php +++ b/api/v3/examples/Country/Get.ex.php @@ -46,14 +46,15 @@ function country_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1256, + 'id' => 1259, 'values' => [ - '1256' => [ - 'id' => '1256', + '1259' => [ + 'id' => '1259', 'name' => 'Made Up Land', 'iso_code' => 'ZZ', 'region_id' => '1', 'is_province_abbreviated' => 0, + 'is_active' => '1', ], ], ]; diff --git a/api/v3/examples/CustomField/Create.ex.php b/api/v3/examples/CustomField/Create.ex.php index 922ce68a2d..ed02778eee 100644 --- a/api/v3/examples/CustomField/Create.ex.php +++ b/api/v3/examples/CustomField/Create.ex.php @@ -86,6 +86,7 @@ function custom_field_create_expectedresult() { 'note_rows' => '', 'column_name' => 'name1_1', 'option_group_id' => '', + 'serialize' => 0, 'filter' => '', 'in_selector' => 0, ], diff --git a/api/v3/examples/CustomGroup/Create.ex.php b/api/v3/examples/CustomGroup/Create.ex.php index efc136f05f..a0b4a0ff8a 100644 --- a/api/v3/examples/CustomGroup/Create.ex.php +++ b/api/v3/examples/CustomGroup/Create.ex.php @@ -80,6 +80,7 @@ function custom_group_create_expectedresult() { 'created_date' => '', 'is_reserved' => '', 'is_public' => '', + 'icon' => '', ], ], ]; diff --git a/api/v3/examples/Domain/Get.ex.php b/api/v3/examples/Domain/Get.ex.php index 1b1f93a35b..0c8e4382dc 100644 --- a/api/v3/examples/Domain/Get.ex.php +++ b/api/v3/examples/Domain/Get.ex.php @@ -50,7 +50,7 @@ function domain_get_expectedresult() { '0' => [ 'id' => '1', 'name' => 'Default Domain Name', - 'version' => '4.6.alpha1', + 'version' => '5.47.alpha1', 'contact_id' => '3', 'locale_custom_strings' => 'a:1:{s:5:\"en_US\";a:0:{}}', 'domain_email' => 'my@email.com', @@ -72,14 +72,14 @@ function domain_get_expectedresult() { ], 'from_name' => 'FIXME', 'from_email' => 'info@EXAMPLE.ORG', - 'domain_version' => '4.6.alpha1', + 'domain_version' => '5.47.alpha1', ], '1' => [ 'id' => '2', 'name' => 'Second Domain', - 'version' => '4.6.alpha1', + 'version' => '5.47.alpha1', 'contact_id' => '2', - 'domain_email' => '\"Domain Email\" ', + 'domain_email' => 'domainemail2@example.org', 'domain_phone' => [ 'phone_type' => 'Phone', 'phone' => '204 555-1001', @@ -98,7 +98,7 @@ function domain_get_expectedresult() { ], 'from_name' => 'FIXME', 'from_email' => 'info@EXAMPLE.ORG', - 'domain_version' => '4.6.alpha1', + 'domain_version' => '5.47.alpha1', ], ], ]; diff --git a/api/v3/examples/Email/Create.ex.php b/api/v3/examples/Email/Create.ex.php index c9aecc1b4e..65c563a7e5 100644 --- a/api/v3/examples/Email/Create.ex.php +++ b/api/v3/examples/Email/Create.ex.php @@ -48,10 +48,10 @@ function email_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 26, + 'id' => 49, 'values' => [ - '26' => [ - 'id' => '26', + '49' => [ + 'id' => '49', 'contact_id' => '23', 'location_type_id' => '1', 'email' => 'api@a-team.com', @@ -59,7 +59,7 @@ function email_create_expectedresult() { 'is_billing' => '', 'on_hold' => '2', 'is_bulkmail' => '', - 'hold_date' => '20190820191652', + 'hold_date' => '20220117122830', 'reset_date' => '', 'signature_text' => '', 'signature_html' => '', diff --git a/api/v3/examples/Email/Delete.ex.php b/api/v3/examples/Email/Delete.ex.php index dc6ff46539..b2bb3c5ba5 100644 --- a/api/v3/examples/Email/Delete.ex.php +++ b/api/v3/examples/Email/Delete.ex.php @@ -12,7 +12,7 @@ */ function email_delete_example() { $params = [ - 'id' => 12, + 'id' => 21, ]; try { diff --git a/api/v3/examples/Email/Replace.ex.php b/api/v3/examples/Email/Replace.ex.php index 6609d21aa9..075ed52e6f 100644 --- a/api/v3/examples/Email/Replace.ex.php +++ b/api/v3/examples/Email/Replace.ex.php @@ -74,8 +74,8 @@ function email_replace_expectedresult() { 'version' => 3, 'count' => 5, 'values' => [ - '13' => [ - 'id' => '13', + '23' => [ + 'id' => '23', 'contact_id' => '17', 'location_type_id' => '34', 'email' => '1-1@example.com', @@ -88,8 +88,8 @@ function email_replace_expectedresult() { 'signature_text' => '', 'signature_html' => '', ], - '14' => [ - 'id' => '14', + '24' => [ + 'id' => '24', 'contact_id' => '17', 'location_type_id' => '34', 'email' => '1-2@example.com', @@ -102,8 +102,8 @@ function email_replace_expectedresult() { 'signature_text' => '', 'signature_html' => '', ], - '15' => [ - 'id' => '15', + '25' => [ + 'id' => '25', 'contact_id' => '17', 'location_type_id' => '34', 'email' => '1-3@example.com', @@ -116,8 +116,8 @@ function email_replace_expectedresult() { 'signature_text' => '', 'signature_html' => '', ], - '16' => [ - 'id' => '16', + '26' => [ + 'id' => '26', 'contact_id' => '17', 'location_type_id' => '35', 'email' => '2-1@example.com', @@ -130,8 +130,8 @@ function email_replace_expectedresult() { 'signature_text' => '', 'signature_html' => '', ], - '17' => [ - 'id' => '17', + '27' => [ + 'id' => '27', 'contact_id' => '17', 'location_type_id' => '35', 'email' => '2-2@example.com', diff --git a/api/v3/examples/EntityBatch/Create.ex.php b/api/v3/examples/EntityBatch/Create.ex.php index 3572431e8d..540e1ba5ba 100644 --- a/api/v3/examples/EntityBatch/Create.ex.php +++ b/api/v3/examples/EntityBatch/Create.ex.php @@ -12,7 +12,7 @@ */ function entity_batch_create_example() { $params = [ - 'entity_id' => 1, + 'entity_id' => '1', 'batch_id' => 1, 'entity_table' => 'civicrm_financial_trxn', ]; diff --git a/api/v3/examples/EntityBatch/Get.ex.php b/api/v3/examples/EntityBatch/Get.ex.php index bcd68a0b1a..ce46614cce 100644 --- a/api/v3/examples/EntityBatch/Get.ex.php +++ b/api/v3/examples/EntityBatch/Get.ex.php @@ -12,7 +12,7 @@ */ function entity_batch_get_example() { $params = [ - 'entity_id' => 2, + 'entity_id' => '3', 'batch_id' => 2, 'entity_table' => 'civicrm_financial_trxn', ]; @@ -53,7 +53,7 @@ function entity_batch_get_expectedresult() { '2' => [ 'id' => '2', 'entity_table' => 'civicrm_financial_trxn', - 'entity_id' => '2', + 'entity_id' => '3', 'batch_id' => '2', ], ], diff --git a/api/v3/examples/EntityTag/Get.ex.php b/api/v3/examples/EntityTag/Get.ex.php index 1e0bfdda43..d47ccee808 100644 --- a/api/v3/examples/EntityTag/Get.ex.php +++ b/api/v3/examples/EntityTag/Get.ex.php @@ -46,10 +46,10 @@ function entity_tag_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 5, + 'id' => 6, 'values' => [ - '5' => [ - 'id' => '5', + '6' => [ + 'id' => '6', 'entity_table' => 'civicrm_contact', 'entity_id' => '18', 'tag_id' => '11', diff --git a/api/v3/examples/Event/ContactRefCustomField.ex.php b/api/v3/examples/Event/ContactRefCustomField.ex.php index 50f77cd80f..419ae61b83 100644 --- a/api/v3/examples/Event/ContactRefCustomField.ex.php +++ b/api/v3/examples/Event/ContactRefCustomField.ex.php @@ -15,7 +15,7 @@ function event_get_example() { $params = [ 'return.custom_2' => 1, - 'custom_2' => 4, + 'custom_2' => 3, ]; try { @@ -81,7 +81,7 @@ function event_get_expectedresult() { 'is_confirm_enabled' => '1', 'is_billing_required' => 0, 'custom_1' => 'defaultValue', - 'custom_2_id' => '4', + 'custom_2_id' => '3', 'custom_2' => 'Contact, Test', ], ], diff --git a/api/v3/examples/Event/Create.ex.php b/api/v3/examples/Event/Create.ex.php index fec2def214..52c0858b00 100644 --- a/api/v3/examples/Event/Create.ex.php +++ b/api/v3/examples/Event/Create.ex.php @@ -68,6 +68,7 @@ function event_create_expectedresult() { 'summary' => 'If you have any CiviCRM related issues or want to track where CiviCRM is heading, Sign up now', 'description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues', 'event_type_id' => '1', + 'participant_listing_id' => '', 'is_public' => '1', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', diff --git a/api/v3/examples/Event/IsFullOption.ex.php b/api/v3/examples/Event/IsFullOption.ex.php index 7b609c7a29..747a6bd30a 100644 --- a/api/v3/examples/Event/IsFullOption.ex.php +++ b/api/v3/examples/Event/IsFullOption.ex.php @@ -71,7 +71,7 @@ function event_getsingle_expectedresult() { 'allow_selfcancelxfer' => 0, 'selfcancelxfer_time' => 0, 'is_template' => 0, - 'created_date' => '2019-08-20 19:17:20', + 'created_date' => '2022-01-17 12:29:42', 'is_share' => '1', 'is_confirm_enabled' => '1', 'is_billing_required' => 0, diff --git a/api/v3/examples/Group/Get.ex.php b/api/v3/examples/Group/Get.ex.php index 83768a1b95..fb92e045cc 100644 --- a/api/v3/examples/Group/Get.ex.php +++ b/api/v3/examples/Group/Get.ex.php @@ -55,9 +55,6 @@ function group_get_expectedresult() { 'description' => 'New Test Group Created', 'is_active' => '1', 'visibility' => 'Public Pages', - 'where_clause' => ' ( ( ( `civicrm_group_contact-5d5bbacea0631`.group_id IN (\"1\") ) ) ) ', - 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:37:\"`civicrm_group_contact-5d5bbacea0631`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbacea0631` ON (contact_a.id = `civicrm_group_contact-5d5bbacea0631`.contact_id AND `civicrm_group_contact-5d5bbacea0631`.status IN (\'Added\'))\";}', - 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:37:\"`civicrm_group_contact-5d5bbacea0631`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbacea0631` ON (contact_a.id = `civicrm_group_contact-5d5bbacea0631`.contact_id AND `civicrm_group_contact-5d5bbacea0631`.status IN (\'Added\'))\";}', 'group_type' => [ '0' => '1', '1' => '2', diff --git a/api/v3/examples/Group/GetFields.ex.php b/api/v3/examples/Group/GetFields.ex.php index 6451c6428a..dcdb68a608 100644 --- a/api/v3/examples/Group/GetFields.ex.php +++ b/api/v3/examples/Group/GetFields.ex.php @@ -47,7 +47,7 @@ function group_getfields_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 20, + 'count' => 22, 'values' => [ 'id' => [ 'name' => 'id', @@ -60,6 +60,13 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'group_id', @@ -77,6 +84,7 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'add' => '1.1', 'is_core_field' => TRUE, ], 'title' => [ @@ -84,8 +92,8 @@ function group_getfields_expectedresult() { 'type' => 2, 'title' => 'Group Title', 'description' => 'Name of Group.', - 'maxlength' => 64, - 'size' => 30, + 'maxlength' => 255, + 'size' => 45, 'where' => 'civicrm_group.title', 'table_name' => 'civicrm_group', 'entity' => 'Group', @@ -93,9 +101,10 @@ function group_getfields_expectedresult() { 'localizable' => 1, 'html' => [ 'type' => 'Text', - 'maxlength' => 64, - 'size' => 30, + 'maxlength' => 255, + 'size' => 45, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => 1, ], @@ -116,6 +125,7 @@ function group_getfields_expectedresult() { 'rows' => 2, 'cols' => 60, ], + 'add' => '1.1', 'is_core_field' => TRUE, ], 'source' => [ @@ -130,6 +140,7 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'add' => '1.1', 'is_core_field' => TRUE, ], 'saved_search_id' => [ @@ -143,6 +154,12 @@ function group_getfields_expectedresult() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_SavedSearch', + 'html' => [ + 'label' => 'Saved Search', + 'size' => 6, + 'maxlength' => 14, + ], + 'add' => '1.1', 'is_core_field' => TRUE, 'FKApiName' => 'SavedSearch', ], @@ -156,6 +173,7 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'add' => '1.1', 'is_core_field' => TRUE, 'api.default' => 1, ], @@ -180,6 +198,7 @@ function group_getfields_expectedresult() { 'pseudoconstant' => [ 'callback' => 'CRM_Core_SelectValues::groupVisibility', ], + 'add' => '1.2', 'is_core_field' => TRUE, ], 'where_clause' => [ @@ -192,6 +211,8 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'readonly' => TRUE, + 'add' => '1.6', 'is_core_field' => TRUE, ], 'select_tables' => [ @@ -205,6 +226,8 @@ function group_getfields_expectedresult() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'serialize' => 4, + 'readonly' => TRUE, + 'add' => '1.6', 'is_core_field' => TRUE, ], 'where_tables' => [ @@ -218,6 +241,8 @@ function group_getfields_expectedresult() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'serialize' => 4, + 'readonly' => TRUE, + 'add' => '1.6', 'is_core_field' => TRUE, ], 'group_type' => [ @@ -237,6 +262,7 @@ function group_getfields_expectedresult() { 'optionGroupName' => 'group_type', 'optionEditPath' => 'civicrm/admin/options/group_type', ], + 'add' => '1.9', 'is_core_field' => TRUE, ], 'cache_date' => [ @@ -250,6 +276,8 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'readonly' => TRUE, + 'add' => '2.1', 'is_core_field' => TRUE, ], 'refresh_date' => [ @@ -263,6 +291,8 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'readonly' => TRUE, + 'add' => '4.3', 'is_core_field' => TRUE, ], 'parents' => [ @@ -279,6 +309,7 @@ function group_getfields_expectedresult() { 'pseudoconstant' => [ 'callback' => 'CRM_Core_PseudoConstant::allGroup', ], + 'add' => '2.1', 'is_core_field' => TRUE, ], 'children' => [ @@ -291,6 +322,7 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'add' => '2.1', 'is_core_field' => TRUE, ], 'is_hidden' => [ @@ -303,6 +335,7 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'add' => '2.2', 'is_core_field' => TRUE, ], 'is_reserved' => [ @@ -314,12 +347,13 @@ function group_getfields_expectedresult() { 'entity' => 'Group', 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, + 'add' => '4.2', 'is_core_field' => TRUE, ], 'created_id' => [ 'name' => 'created_id', 'type' => 1, - 'title' => 'Group Created By', + 'title' => 'Created By Contact ID', 'description' => 'FK to contact table.', 'where' => 'civicrm_group.created_id', 'table_name' => 'civicrm_group', @@ -327,13 +361,19 @@ function group_getfields_expectedresult() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'html' => [ + 'label' => 'Created By', + 'size' => 6, + 'maxlength' => 14, + ], + 'add' => '4.3', 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], 'modified_id' => [ 'name' => 'modified_id', 'type' => 1, - 'title' => 'Group Modified By', + 'title' => 'Modified By Contact ID', 'description' => 'FK to contact table.', 'where' => 'civicrm_group.modified_id', 'table_name' => 'civicrm_group', @@ -341,9 +381,56 @@ function group_getfields_expectedresult() { 'bao' => 'CRM_Contact_BAO_Group', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'html' => [ + 'label' => 'Modified By', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '4.5', 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], + 'frontend_title' => [ + 'name' => 'frontend_title', + 'type' => 2, + 'title' => 'Public Group Title', + 'description' => 'Alternative public title for this Group.', + 'maxlength' => 255, + 'size' => 45, + 'where' => 'civicrm_group.frontend_title', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 1, + 'html' => [ + 'type' => 'Text', + 'maxlength' => 255, + 'size' => 45, + ], + 'add' => '5.31', + 'is_core_field' => TRUE, + ], + 'frontend_description' => [ + 'name' => 'frontend_description', + 'type' => 32, + 'title' => 'Public Group Description', + 'description' => 'Alternative public description of the group.', + 'rows' => 2, + 'cols' => 60, + 'where' => 'civicrm_group.frontend_description', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', + 'localizable' => 1, + 'html' => [ + 'type' => 'TextArea', + 'rows' => 2, + 'cols' => 60, + ], + 'add' => '5.31', + 'is_core_field' => TRUE, + ], ], ]; diff --git a/api/v3/examples/GroupContact/GetWithGroupID.ex.php b/api/v3/examples/GroupContact/GetWithGroupID.ex.php index f1bc83665a..113a76de57 100644 --- a/api/v3/examples/GroupContact/GetWithGroupID.ex.php +++ b/api/v3/examples/GroupContact/GetWithGroupID.ex.php @@ -70,9 +70,6 @@ function group_contact_get_expectedresult() { 'description' => 'New Test Group Created', 'is_active' => '1', 'visibility' => 'Public Pages', - 'where_clause' => ' ( ( ( `civicrm_group_contact-5d5bbabeb0cbd`.group_id IN (\"3\") ) ) ) ', - 'select_tables' => 'a:8:{s:15:\"civicrm_contact\";i:1;s:15:\"civicrm_address\";i:1;s:15:\"civicrm_country\";i:1;s:13:\"civicrm_email\";i:1;s:13:\"civicrm_phone\";i:1;s:10:\"civicrm_im\";i:1;s:19:\"civicrm_worldregion\";i:1;s:37:\"`civicrm_group_contact-5d5bbabeb0cbd`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbabeb0cbd` ON (contact_a.id = `civicrm_group_contact-5d5bbabeb0cbd`.contact_id AND `civicrm_group_contact-5d5bbabeb0cbd`.status IN (\'Added\'))\";}', - 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:37:\"`civicrm_group_contact-5d5bbabeb0cbd`\";s:201:\" LEFT JOIN civicrm_group_contact `civicrm_group_contact-5d5bbabeb0cbd` ON (contact_a.id = `civicrm_group_contact-5d5bbabeb0cbd`.contact_id AND `civicrm_group_contact-5d5bbabeb0cbd`.status IN (\'Added\'))\";}', 'group_type' => [ '0' => '1', '1' => '2', diff --git a/api/v3/examples/GroupOrganization/Create.ex.php b/api/v3/examples/GroupOrganization/Create.ex.php index 717c4c3bcf..63552d4da8 100644 --- a/api/v3/examples/GroupOrganization/Create.ex.php +++ b/api/v3/examples/GroupOrganization/Create.ex.php @@ -12,8 +12,8 @@ */ function group_organization_create_example() { $params = [ - 'organization_id' => 8, - 'group_id' => 6, + 'organization_id' => 12, + 'group_id' => 10, ]; try { @@ -47,12 +47,12 @@ function group_organization_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 6, 'values' => [ - '3' => [ - 'id' => '3', - 'group_id' => '6', - 'organization_id' => '8', + '6' => [ + 'id' => '6', + 'group_id' => '10', + 'organization_id' => '12', ], ], ]; diff --git a/api/v3/examples/GroupOrganization/Delete.ex.php b/api/v3/examples/GroupOrganization/Delete.ex.php index 439e672c39..e84acd361f 100644 --- a/api/v3/examples/GroupOrganization/Delete.ex.php +++ b/api/v3/examples/GroupOrganization/Delete.ex.php @@ -12,7 +12,7 @@ */ function group_organization_delete_example() { $params = [ - 'id' => 5, + 'id' => 10, ]; try { diff --git a/api/v3/examples/GroupOrganization/Get.ex.php b/api/v3/examples/GroupOrganization/Get.ex.php index 0e1ebd68d9..c0ef24fa35 100644 --- a/api/v3/examples/GroupOrganization/Get.ex.php +++ b/api/v3/examples/GroupOrganization/Get.ex.php @@ -12,7 +12,7 @@ */ function group_organization_get_example() { $params = [ - 'organization_id' => 1, + 'organization_id' => 2, ]; try { diff --git a/api/v3/examples/Im/Create.ex.php b/api/v3/examples/Im/Create.ex.php index 5b0d1619f2..03af0f6cae 100644 --- a/api/v3/examples/Im/Create.ex.php +++ b/api/v3/examples/Im/Create.ex.php @@ -48,15 +48,15 @@ function im_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', + '3' => [ + 'id' => '3', 'contact_id' => '5', 'location_type_id' => '1', 'name' => 'My Yahoo IM Handle', 'provider_id' => '1', - 'is_primary' => '', + 'is_primary' => '1', 'is_billing' => '', ], ], diff --git a/api/v3/examples/Im/Delete.ex.php b/api/v3/examples/Im/Delete.ex.php index f580d63666..d2f5e2a4ca 100644 --- a/api/v3/examples/Im/Delete.ex.php +++ b/api/v3/examples/Im/Delete.ex.php @@ -12,7 +12,7 @@ */ function im_delete_example() { $params = [ - 'id' => 4, + 'id' => 7, ]; try { diff --git a/api/v3/examples/Im/Get.ex.php b/api/v3/examples/Im/Get.ex.php index ba86e21b12..dd611a3818 100644 --- a/api/v3/examples/Im/Get.ex.php +++ b/api/v3/examples/Im/Get.ex.php @@ -49,15 +49,15 @@ function im_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 5, 'values' => [ - '3' => [ - 'id' => '3', + '5' => [ + 'id' => '5', 'contact_id' => '7', 'location_type_id' => '1', 'name' => 'My Yahoo IM Handle', 'provider_id' => '1', - 'is_primary' => 0, + 'is_primary' => '1', 'is_billing' => 0, ], ], diff --git a/api/v3/examples/Job/Clone.ex.php b/api/v3/examples/Job/Clone.ex.php index 2136ac4186..aad91cb682 100644 --- a/api/v3/examples/Job/Clone.ex.php +++ b/api/v3/examples/Job/Clone.ex.php @@ -55,7 +55,7 @@ function job_clone_expectedresult() { 'name' => 'API_Test_Job - Copy', 'description' => 'A long description written by hand in cursive', 'api_entity' => 'ApiTestEntity', - 'api_action' => 'apitestaction', + 'api_action' => 'api_test_action', 'parameters' => 'Semi-formal explanation of runtime job parameters', 'is_active' => '1', ], diff --git a/api/v3/examples/Job/Create.ex.php b/api/v3/examples/Job/Create.ex.php index 6dd7a4c011..f022cce7d9 100644 --- a/api/v3/examples/Job/Create.ex.php +++ b/api/v3/examples/Job/Create.ex.php @@ -17,7 +17,7 @@ function job_create_example() { 'description' => 'A long description written by hand in cursive', 'run_frequency' => 'Daily', 'api_entity' => 'ApiTestEntity', - 'api_action' => 'apitestaction', + 'api_action' => 'api_test_action', 'parameters' => 'Semi-formal explanation of runtime job parameters', 'is_active' => 1, ]; @@ -64,7 +64,7 @@ function job_create_expectedresult() { 'name' => 'API_Test_Job', 'description' => 'A long description written by hand in cursive', 'api_entity' => 'ApiTestEntity', - 'api_action' => 'apitestaction', + 'api_action' => 'api_test_action', 'parameters' => 'Semi-formal explanation of runtime job parameters', 'is_active' => '1', ], diff --git a/api/v3/examples/LineItem/Create.ex.php b/api/v3/examples/LineItem/Create.ex.php index d0eae85f80..a3e8a21044 100644 --- a/api/v3/examples/LineItem/Create.ex.php +++ b/api/v3/examples/LineItem/Create.ex.php @@ -15,11 +15,10 @@ function line_item_create_example() { 'price_field_value_id' => 1, 'price_field_id' => 1, 'entity_table' => 'civicrm_contribution', - 'entity_id' => 1, + 'entity_id' => 3, 'qty' => 1, 'unit_price' => 50, 'line_total' => 50, - 'debug' => 1, ]; try { @@ -53,12 +52,12 @@ function line_item_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 6, 'values' => [ - '2' => [ - 'id' => '2', + '6' => [ + 'id' => '6', 'entity_table' => 'civicrm_contribution', - 'entity_id' => '1', + 'entity_id' => '3', 'contribution_id' => '', 'price_field_id' => '1', 'label' => 'line item', @@ -70,6 +69,7 @@ function line_item_create_expectedresult() { 'financial_type_id' => '', 'non_deductible_amount' => '', 'tax_amount' => '', + 'membership_num_terms' => '', ], ], ]; diff --git a/api/v3/examples/LineItem/Delete.ex.php b/api/v3/examples/LineItem/Delete.ex.php index bc27daf2e7..21b035602e 100644 --- a/api/v3/examples/LineItem/Delete.ex.php +++ b/api/v3/examples/LineItem/Delete.ex.php @@ -12,7 +12,7 @@ */ function line_item_delete_example() { $params = [ - 'id' => 4, + 'id' => 17, ]; try { diff --git a/api/v3/examples/LineItem/Get.ex.php b/api/v3/examples/LineItem/Get.ex.php index 9c4d330954..1feccf9180 100644 --- a/api/v3/examples/LineItem/Get.ex.php +++ b/api/v3/examples/LineItem/Get.ex.php @@ -46,13 +46,13 @@ function line_item_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 15, 'values' => [ - '3' => [ - 'id' => '3', + '15' => [ + 'id' => '15', 'entity_table' => 'civicrm_contribution', - 'entity_id' => '2', - 'contribution_id' => '2', + 'entity_id' => '7', + 'contribution_id' => '7', 'price_field_id' => '1', 'label' => 'Contribution Amount', 'qty' => '1.00', @@ -61,6 +61,7 @@ function line_item_get_expectedresult() { 'price_field_value_id' => '1', 'financial_type_id' => '1', 'non_deductible_amount' => '0.00', + 'tax_amount' => '0.00', 'contribution_type_id' => '1', ], ], diff --git a/api/v3/examples/Logging/Get.ex.php b/api/v3/examples/Logging/Get.ex.php index d484e16ec6..28484e4b58 100644 --- a/api/v3/examples/Logging/Get.ex.php +++ b/api/v3/examples/Logging/Get.ex.php @@ -54,7 +54,7 @@ function logging_get_expectedresult() { 'from' => 'Anderson, Anthony', 'to' => 'Dwarf, Dopey', 'table' => 'civicrm_contact', - 'log_date' => '2019-08-20 19:23:24', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '1' => [ @@ -64,7 +64,7 @@ function logging_get_expectedresult() { 'from' => 'Mr. Anthony Anderson II', 'to' => 'Mr. Dopey Dwarf II', 'table' => 'civicrm_contact', - 'log_date' => '2019-08-20 19:23:24', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '2' => [ @@ -74,7 +74,7 @@ function logging_get_expectedresult() { 'from' => 'Anthony', 'to' => 'Dopey', 'table' => 'civicrm_contact', - 'log_date' => '2019-08-20 19:23:24', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '3' => [ @@ -84,137 +84,137 @@ function logging_get_expectedresult() { 'from' => 'Anderson', 'to' => 'Dwarf', 'table' => 'civicrm_contact', - 'log_date' => '2019-08-20 19:23:24', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '4' => [ 'action' => 'Update', 'id' => '3', 'field' => 'modified_date', - 'from' => '2019-08-20 19:23:20', - 'to' => '2019-08-20 19:23:24', + 'from' => '2022-01-17 12:53:29', + 'to' => '2022-01-17 12:53:39', 'table' => 'civicrm_contact', - 'log_date' => '2019-08-20 19:23:24', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '5' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'id', 'from' => '', - 'to' => '2', + 'to' => '4', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '6' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'contact_id', 'from' => '', 'to' => '3', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '7' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'location_type_id', 'from' => '', 'to' => '1', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '8' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'email', 'from' => '', 'to' => 'dopey@mail.com', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '9' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'is_primary', 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '10' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'is_billing', 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '11' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'on_hold', 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '12' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'is_bulkmail', 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '13' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'hold_date', 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '14' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'reset_date', 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '15' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'signature_text', 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], '16' => [ 'action' => 'Insert', - 'id' => '2', + 'id' => '4', 'field' => 'signature_html', 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2019-08-20 19:23:25', + 'log_date' => '2022-01-17 12:53:39', 'log_conn_id' => 'wooty wop wop', ], ], diff --git a/api/v3/examples/Logging/Revert.ex.php b/api/v3/examples/Logging/Revert.ex.php index 7c9906ce70..59c11fff93 100644 --- a/api/v3/examples/Logging/Revert.ex.php +++ b/api/v3/examples/Logging/Revert.ex.php @@ -13,7 +13,7 @@ function logging_revert_example() { $params = [ 'log_conn_id' => 'woot', - 'log_date' => '2019-08-20 19:22:48', + 'log_date' => '2022-01-17 12:52:20', ]; try { @@ -55,7 +55,7 @@ function logging_revert_expectedresult() { /* * This example has been generated from the API test suite. - * The test that created it is called "/home/seamus/buildkit/build/47-test/sites/all/modules/civicrm/tests/phpunit/api/v3/LoggingTest.php" + * The test that created it is called "/home/seamus/buildkit/build/47-test/web/sites/all/modules/civicrm/tests/phpunit/api/v3/LoggingTest.php" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/Revert * diff --git a/api/v3/examples/MailSettings/ChainedGetDelete.ex.php b/api/v3/examples/MailSettings/ChainedGetDelete.ex.php index 96b5d85711..8dd2b35d5a 100644 --- a/api/v3/examples/MailSettings/ChainedGetDelete.ex.php +++ b/api/v3/examples/MailSettings/ChainedGetDelete.ex.php @@ -49,10 +49,10 @@ function mail_settings_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 6, + 'id' => 10, 'values' => [ - '6' => [ - 'id' => '6', + '10' => [ + 'id' => '10', 'domain_id' => '1', 'name' => 'delete this setting', 'is_default' => '1', @@ -62,6 +62,8 @@ function mail_settings_get_expectedresult() { 'username' => 'sue', 'password' => 'pass', 'is_ssl' => 0, + 'is_non_case_email_skipped' => 0, + 'is_contact_creation_disabled_if_no_match' => 0, 'api.MailSettings.delete' => [ 'is_error' => 0, 'version' => 3, diff --git a/api/v3/examples/MailSettings/Create.ex.php b/api/v3/examples/MailSettings/Create.ex.php index 9478fb5768..12357ea680 100644 --- a/api/v3/examples/MailSettings/Create.ex.php +++ b/api/v3/examples/MailSettings/Create.ex.php @@ -53,10 +53,10 @@ function mail_settings_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 5, + 'id' => 8, 'values' => [ - '5' => [ - 'id' => '5', + '8' => [ + 'id' => '8', 'domain_id' => '1', 'name' => 'my mail setting', 'is_default' => '1', @@ -71,6 +71,8 @@ function mail_settings_create_expectedresult() { 'is_ssl' => '', 'source' => '', 'activity_status' => '', + 'is_non_case_email_skipped' => '', + 'is_contact_creation_disabled_if_no_match' => '', ], ], ]; diff --git a/api/v3/examples/MailSettings/Delete.ex.php b/api/v3/examples/MailSettings/Delete.ex.php index 7b82359b83..87945c6be8 100644 --- a/api/v3/examples/MailSettings/Delete.ex.php +++ b/api/v3/examples/MailSettings/Delete.ex.php @@ -12,7 +12,7 @@ */ function mail_settings_delete_example() { $params = [ - 'id' => 5, + 'id' => 8, ]; try { diff --git a/api/v3/examples/MailSettings/Get.ex.php b/api/v3/examples/MailSettings/Get.ex.php index a4cf3e0370..b007e786e2 100644 --- a/api/v3/examples/MailSettings/Get.ex.php +++ b/api/v3/examples/MailSettings/Get.ex.php @@ -53,10 +53,10 @@ function mail_settings_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 4, + 'id' => 6, 'values' => [ - '4' => [ - 'id' => '4', + '6' => [ + 'id' => '6', 'domain_id' => '1', 'name' => 'my mail setting', 'is_default' => '1', @@ -66,6 +66,8 @@ function mail_settings_get_expectedresult() { 'username' => 'sue', 'password' => 'pass', 'is_ssl' => 0, + 'is_non_case_email_skipped' => 0, + 'is_contact_creation_disabled_if_no_match' => 0, ], ], ]; diff --git a/api/v3/examples/Mailing/Clone.ex.php b/api/v3/examples/Mailing/Clone.ex.php index 6a7b0fe773..fd9ebc16e6 100644 --- a/api/v3/examples/Mailing/Clone.ex.php +++ b/api/v3/examples/Mailing/Clone.ex.php @@ -12,7 +12,7 @@ */ function mailing_clone_example() { $params = [ - 'id' => 27, + 'id' => 28, ]; try { @@ -46,10 +46,10 @@ function mailing_clone_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 28, + 'id' => 29, 'values' => [ - '28' => [ - 'id' => '28', + '29' => [ + 'id' => '29', 'domain_id' => '1', 'header_id' => '1', 'footer_id' => '2', @@ -68,7 +68,7 @@ function mailing_clone_expectedresult() { 'body_text' => 'This is {contact.display_name}. https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

Forward this emailForward this email with no protocolThis is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

Forward this email

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'url_tracking' => '1', 'forward_replies' => 0, 'auto_responder' => 0, @@ -76,7 +76,7 @@ https://civicrm.org 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '154', + 'created_id' => '157', 'created_date' => '2013-07-28 08:49:19', 'modified_date' => '2012-11-14 16:02:35', 'scheduled_id' => '', diff --git a/api/v3/examples/Mailing/Create.ex.php b/api/v3/examples/Mailing/Create.ex.php index 111af79210..b02fd78d14 100644 --- a/api/v3/examples/Mailing/Create.ex.php +++ b/api/v3/examples/Mailing/Create.ex.php @@ -16,17 +16,17 @@ function mailing_create_example() { 'body_text' => 'This is {contact.display_name}. https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

Forward this emailForward this email with no protocolThis is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

Forward this email

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'name' => 'mailing name', - 'created_id' => 15, + 'created_id' => 18, 'header_id' => '', 'footer_id' => '', 'groups' => [ 'include' => [ - '0' => 13, + '0' => 15, ], 'exclude' => [ - '0' => 14, + '0' => 16, ], ], 'mailings' => [ @@ -78,10 +78,10 @@ function mailing_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 9, + 'id' => 10, 'values' => [ - '9' => [ - 'id' => '9', + '10' => [ + 'id' => '10', 'domain_id' => '1', 'header_id' => '', 'footer_id' => '', @@ -100,7 +100,7 @@ function mailing_create_expectedresult() { 'body_text' => 'This is {contact.display_name}. https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

Forward this emailForward this email with no protocolThis is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

Forward this email

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'url_tracking' => '1', 'forward_replies' => 0, 'auto_responder' => 0, @@ -108,7 +108,7 @@ https://civicrm.org 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '15', + 'created_id' => '18', 'created_date' => '2013-07-28 08:49:19', 'modified_date' => '2012-11-14 16:02:35', 'scheduled_id' => '', @@ -134,9 +134,9 @@ https://civicrm.org 'values' => [ '0' => [ 'id' => '4', - 'mailing_id' => '9', - 'contact_id' => '16', - 'email_id' => '16', + 'mailing_id' => '10', + 'contact_id' => '19', + 'email_id' => '19', 'api.contact.getvalue' => 'Mr. Includer Person II', 'api.email.getvalue' => 'include.me@example.org', ], diff --git a/api/v3/examples/Mailing/Delete.ex.php b/api/v3/examples/Mailing/Delete.ex.php index c6606a95ee..9e3f5abaf9 100644 --- a/api/v3/examples/Mailing/Delete.ex.php +++ b/api/v3/examples/Mailing/Delete.ex.php @@ -12,7 +12,7 @@ */ function mailing_delete_example() { $params = [ - 'id' => 26, + 'id' => 27, ]; try { diff --git a/api/v3/examples/Mailing/GetTokens.ex.php b/api/v3/examples/Mailing/GetTokens.ex.php index f7235d7903..d5f75dea9e 100644 --- a/api/v3/examples/Mailing/GetTokens.ex.php +++ b/api/v3/examples/Mailing/GetTokens.ex.php @@ -51,7 +51,7 @@ function mailing_gettokens_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 88, + 'count' => 90, 'values' => [ '{action.unsubscribe}' => 'Unsubscribe via email', '{action.unsubscribeUrl}' => 'Unsubscribe via web page', @@ -62,52 +62,58 @@ function mailing_gettokens_expectedresult() { '{action.forward}' => 'Forward this email (link)', '{action.reply}' => 'Reply to this email (link)', '{action.subscribeUrl}' => 'Subscribe via web page', + '{mailing.key}' => 'Mailing key', + '{mailing.name}' => 'Mailing name', + '{mailing.group}' => 'Mailing group', + '{mailing.viewUrl}' => 'Mailing permalink', '{domain.name}' => 'Domain name', '{domain.address}' => 'Domain (organization) address', '{domain.phone}' => 'Domain (organization) phone', '{domain.email}' => 'Domain (organization) email', - '{mailing.name}' => 'Mailing name', - '{mailing.group}' => 'Mailing group', - '{mailing.viewUrl}' => 'Mailing permalink', - '{contact.contact_type}' => 'Contact Type', - '{contact.do_not_email}' => 'Do Not Email', - '{contact.do_not_phone}' => 'Do Not Phone', - '{contact.do_not_mail}' => 'Do Not Mail', - '{contact.do_not_sms}' => 'Do Not Sms', - '{contact.do_not_trade}' => 'Do Not Trade', - '{contact.is_opt_out}' => 'No Bulk Emails (User Opt Out)', + '{domain.id}' => 'Domain ID', + '{domain.description}' => 'Domain Description', + '{domain.now}' => 'Current time/date', + '{domain.tax_term}' => 'Sales tax term (e.g VAT)', + '{contact.checksum}' => 'Checksum', + '{contact.current_employer}' => 'Current Employer', + '{contact.world_region}' => 'World Region', + '{contact.id}' => 'Contact ID', + '{contact.contact_type:label}' => 'Contact Type', + '{contact.do_not_email:label}' => 'Do Not Email', + '{contact.do_not_phone:label}' => 'Do Not Phone', + '{contact.do_not_mail:label}' => 'Do Not Mail', + '{contact.do_not_sms:label}' => 'Do Not Sms', + '{contact.do_not_trade:label}' => 'Do Not Trade', + '{contact.is_opt_out:label}' => 'No Bulk Emails (User Opt Out)', '{contact.external_identifier}' => 'External Identifier', '{contact.sort_name}' => 'Sort Name', '{contact.display_name}' => 'Display Name', '{contact.nick_name}' => 'Nickname', '{contact.image_URL}' => 'Image Url', - '{contact.preferred_communication_method}' => 'Preferred Communication Method', - '{contact.preferred_language}' => 'Preferred Language', - '{contact.preferred_mail_format}' => 'Preferred Mail Format', + '{contact.preferred_communication_method:label}' => 'Preferred Communication Method', + '{contact.preferred_language:label}' => 'Preferred Language', + '{contact.preferred_mail_format:label}' => 'Preferred Mail Format', '{contact.hash}' => 'Contact Hash', - '{contact.contact_source}' => 'Contact Source', + '{contact.source}' => 'Contact Source', '{contact.first_name}' => 'First Name', '{contact.middle_name}' => 'Middle Name', '{contact.last_name}' => 'Last Name', '{contact.prefix_id:label}' => 'Individual Prefix', '{contact.suffix_id:label}' => 'Individual Suffix', '{contact.formal_title}' => 'Formal Title', - '{contact.communication_style}' => 'Communication Style', - '{contact.email_greeting_id}' => 'Email Greeting ID', - '{contact.postal_greeting_id}' => 'Postal Greeting ID', - '{contact.addressee_id}' => 'Addressee ID', + '{contact.communication_style_id:label}' => 'Communication Style', + '{contact.email_greeting_display}' => 'Email Greeting', + '{contact.postal_greeting_display}' => 'Postal Greeting', + '{contact.addressee_display}' => 'Addressee', '{contact.job_title}' => 'Job Title', - '{contact.gender}' => 'Gender', + '{contact.gender_id:label}' => 'Gender', '{contact.birth_date}' => 'Birth Date', - '{contact.current_employer_id}' => 'Current Employer ID', - '{contact.contact_is_deleted}' => 'Contact is in Trash', + '{contact.employer_id}' => 'Current Employer ID', + '{contact.is_deleted:label}' => 'Contact is in Trash', '{contact.created_date}' => 'Created Date', '{contact.modified_date}' => 'Modified Date', - '{contact.addressee}' => 'Addressee', - '{contact.email_greeting}' => 'Email Greeting', - '{contact.postal_greeting}' => 'Postal Greeting', - '{contact.current_employer}' => 'Current Employer', - '{contact.location_type}' => 'Location Type', + '{contact.address_id}' => 'Address ID', + '{contact.location_type_id:label}' => 'Address Location Type', '{contact.street_address}' => 'Street Address', '{contact.street_number}' => 'Street Number', '{contact.street_number_suffix}' => 'Street Number Suffix', @@ -117,30 +123,26 @@ function mailing_gettokens_expectedresult() { '{contact.supplemental_address_2}' => 'Supplemental Address 2', '{contact.supplemental_address_3}' => 'Supplemental Address 3', '{contact.city}' => 'City', + '{contact.county}' => 'County', '{contact.postal_code_suffix}' => 'Postal Code Suffix', '{contact.postal_code}' => 'Postal Code', + '{contact.country}' => 'Country', '{contact.geo_code_1}' => 'Latitude', '{contact.geo_code_2}' => 'Longitude', - '{contact.manual_geo_code}' => 'Is Manually Geocoded', '{contact.address_name}' => 'Address Name', - '{contact.master_id}' => 'Master Address Belongs To', - '{contact.county}' => 'County', - '{contact.state_province}' => 'State', - '{contact.country}' => 'Country', + '{contact.master_id}' => 'Master Address ID', '{contact.phone}' => 'Phone', '{contact.phone_ext}' => 'Phone Extension', - '{contact.phone_type_id}' => 'Phone Type', + '{contact.phone_type}' => 'Phone Type', '{contact.email}' => 'Email', - '{contact.on_hold}' => 'On Hold', + '{contact.on_hold:label}' => 'On Hold', '{contact.signature_text}' => 'Signature Text', '{contact.signature_html}' => 'Signature Html', - '{contact.im_provider}' => 'IM Provider', - '{contact.im}' => 'IM Screen Name', - '{contact.openid}' => 'OpenID', - '{contact.world_region}' => 'World Region', '{contact.url}' => 'Website', - '{contact.checksum}' => 'Checksum', - '{contact.contact_id}' => 'Internal Contact ID', + '{contact.openid}' => 'OpenID', + '{contact.im}' => 'IM Screen Name', + '{contact.provider_id:label}' => 'IM Provider', + '{contact.state_province}' => 'State/Province', ], ]; diff --git a/api/v3/examples/Mailing/Submit.ex.php b/api/v3/examples/Mailing/Submit.ex.php index 5806fe713f..067a0ebf23 100644 --- a/api/v3/examples/Mailing/Submit.ex.php +++ b/api/v3/examples/Mailing/Submit.ex.php @@ -14,7 +14,7 @@ function mailing_submit_example() { $params = [ 'scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00', - 'id' => 22, + 'id' => 23, ]; try { @@ -48,13 +48,13 @@ function mailing_submit_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 22, + 'id' => 23, 'values' => [ - '22' => [ - 'id' => '22', + '23' => [ + 'id' => '23', 'domain_id' => '1', 'header_id' => '', - 'footer_id' => '31', + 'footer_id' => '33', 'reply_id' => '8', 'unsubscribe_id' => '5', 'resubscribe_id' => '6', @@ -78,12 +78,12 @@ https://civicrm.org 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '45', + 'created_id' => '48', 'created_date' => '2013-07-28 08:49:19', 'modified_date' => '2012-11-14 16:02:35', - 'scheduled_id' => '46', + 'scheduled_id' => '49', 'scheduled_date' => '20130728085413', - 'approver_id' => '46', + 'approver_id' => '49', 'approval_date' => '20130728085413', 'approval_status_id' => '1', 'approval_note' => '', diff --git a/api/v3/examples/MailingAB/Create.ex.php b/api/v3/examples/MailingAB/Create.ex.php index 55be6a9efd..8064520b84 100644 --- a/api/v3/examples/MailingAB/Create.ex.php +++ b/api/v3/examples/MailingAB/Create.ex.php @@ -65,7 +65,7 @@ function mailing_a_b_create_expectedresult() { 'testing_criteria' => 'subject', 'winner_criteria' => 'open', 'specific_url' => '', - 'declare_winning_time' => '20190822192332', + 'declare_winning_time' => '20220119125416', 'group_percentage' => '10', 'created_id' => '3', 'created_date' => '2013-07-28 08:49:19', diff --git a/api/v3/examples/Membership/Create.ex.php b/api/v3/examples/Membership/Create.ex.php index 5226c01707..ad4357b6c9 100644 --- a/api/v3/examples/Membership/Create.ex.php +++ b/api/v3/examples/Membership/Create.ex.php @@ -19,7 +19,7 @@ function membership_create_example() { 'end_date' => '2006-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 31, + 'status_id' => 33, ]; try { @@ -63,7 +63,7 @@ function membership_create_expectedresult() { 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '31', + 'status_id' => '33', 'is_override' => '1', 'status_override_end_date' => '', 'owner_membership_id' => '', diff --git a/api/v3/examples/Membership/CreateWithCustomData.ex.php b/api/v3/examples/Membership/CreateWithCustomData.ex.php index 57ef617065..c37523e888 100644 --- a/api/v3/examples/Membership/CreateWithCustomData.ex.php +++ b/api/v3/examples/Membership/CreateWithCustomData.ex.php @@ -13,7 +13,7 @@ function membership_create_example() { $params = [ 'contact_id' => 3, - 'membership_type_id' => 1, + 'membership_type_id' => 'General', 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', diff --git a/api/v3/examples/Membership/Get.ex.php b/api/v3/examples/Membership/Get.ex.php index d3242edf66..98d76362c4 100644 --- a/api/v3/examples/Membership/Get.ex.php +++ b/api/v3/examples/Membership/Get.ex.php @@ -12,7 +12,8 @@ */ function membership_get_example() { $params = [ - 'membership_type_id' => 1, + 'membership_type_id' => 'General', + 'return' => 'custom_1', ]; try { @@ -50,20 +51,7 @@ function membership_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '3', - 'membership_type_id' => '1', - 'join_date' => '2009-01-21', - 'start_date' => '2013-07-29 00:00:00', - 'end_date' => '2013-08-04 00:00:00', - 'source' => 'Payment', - 'status_id' => '20', - 'is_override' => '1', - 'is_test' => 0, - 'is_pay_later' => 0, 'custom_1' => 'custom string', - 'membership_name' => 'General', - 'relationship_name' => 'Child of', - 'custom_1_1' => 'custom string', ], ], ]; diff --git a/api/v3/examples/Membership/SearchWithCustomData.ex.php b/api/v3/examples/Membership/SearchWithCustomData.ex.php index 7c79fa1d40..900e2b4f38 100644 --- a/api/v3/examples/Membership/SearchWithCustomData.ex.php +++ b/api/v3/examples/Membership/SearchWithCustomData.ex.php @@ -13,7 +13,7 @@ function membership_create_example() { $params = [ 'contact_id' => 3, - 'membership_type_id' => 1, + 'membership_type_id' => 'General', 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', diff --git a/api/v3/examples/Membership/UpdateCustomData.ex.php b/api/v3/examples/Membership/UpdateCustomData.ex.php index 625e77263f..f21a17757d 100644 --- a/api/v3/examples/Membership/UpdateCustomData.ex.php +++ b/api/v3/examples/Membership/UpdateCustomData.ex.php @@ -13,13 +13,13 @@ function membership_create_example() { $params = [ 'contact_id' => 3, - 'membership_type_id' => 1, + 'membership_type_id' => 'General', 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 42, + 'status_id' => 43, 'custom_1' => 'custom string', ]; @@ -64,7 +64,7 @@ function membership_create_expectedresult() { 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '42', + 'status_id' => '43', 'is_override' => '1', 'status_override_end_date' => '', 'owner_membership_id' => '', diff --git a/api/v3/examples/MembershipPayment/Get.ex.php b/api/v3/examples/MembershipPayment/Get.ex.php index 8e35a1426d..0f0043af14 100644 --- a/api/v3/examples/MembershipPayment/Get.ex.php +++ b/api/v3/examples/MembershipPayment/Get.ex.php @@ -12,7 +12,7 @@ */ function membership_payment_get_example() { $params = [ - 'contribution_id' => 4, + 'contribution_id' => 3, 'membership_id' => 2, ]; @@ -52,7 +52,7 @@ function membership_payment_get_expectedresult() { '2' => [ 'id' => '2', 'membership_id' => '2', - 'contribution_id' => '4', + 'contribution_id' => '3', ], ], ]; diff --git a/api/v3/examples/MembershipType/Create.ex.php b/api/v3/examples/MembershipType/Create.ex.php index bda7d55f17..3939701e8f 100644 --- a/api/v3/examples/MembershipType/Create.ex.php +++ b/api/v3/examples/MembershipType/Create.ex.php @@ -14,7 +14,7 @@ function membership_type_create_example() { $params = [ 'name' => '40+ Membership', 'description' => 'people above 40 are given health instructions', - 'member_of_contact_id' => 7, + 'member_of_contact_id' => 11, 'financial_type_id' => 1, 'domain_id' => '1', 'minimum_fee' => '200', @@ -55,14 +55,14 @@ function membership_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', + '3' => [ + 'id' => '3', 'domain_id' => '1', 'name' => '40+ Membership', 'description' => 'people above 40 are given health instructions', - 'member_of_contact_id' => '7', + 'member_of_contact_id' => '11', 'financial_type_id' => '1', 'minimum_fee' => '200', 'duration_unit' => 'month', diff --git a/api/v3/examples/MembershipType/Delete.ex.php b/api/v3/examples/MembershipType/Delete.ex.php index 7ee0f2a758..e64a2705b5 100644 --- a/api/v3/examples/MembershipType/Delete.ex.php +++ b/api/v3/examples/MembershipType/Delete.ex.php @@ -12,7 +12,7 @@ */ function membership_type_delete_example() { $params = [ - 'id' => 5, + 'id' => 10, ]; try { diff --git a/api/v3/examples/MembershipType/Get.ex.php b/api/v3/examples/MembershipType/Get.ex.php index 52f1c1a825..2c403d858a 100644 --- a/api/v3/examples/MembershipType/Get.ex.php +++ b/api/v3/examples/MembershipType/Get.ex.php @@ -52,7 +52,7 @@ function membership_type_get_expectedresult() { 'id' => '1', 'domain_id' => '1', 'name' => 'General', - 'member_of_contact_id' => '4', + 'member_of_contact_id' => '5', 'financial_type_id' => '2', 'minimum_fee' => '0.000000000', 'duration_unit' => 'year', diff --git a/api/v3/examples/MessageTemplate/Create.ex.php b/api/v3/examples/MessageTemplate/Create.ex.php index 17e48b027b..72102eda2e 100644 --- a/api/v3/examples/MessageTemplate/Create.ex.php +++ b/api/v3/examples/MessageTemplate/Create.ex.php @@ -12,13 +12,13 @@ */ function message_template_create_example() { $params = [ - 'msg_title' => 'msg_title_471', - 'msg_subject' => 'msg_subject_471', - 'msg_text' => 'msg_text_471', - 'msg_html' => 'msg_html_471', - 'workflow_id' => 471, + 'msg_title' => 'msg_title_356', + 'msg_subject' => 'msg_subject_356', + 'msg_text' => 'msg_text_356', + 'msg_html' => 'msg_html_356', + 'workflow_id' => 356, 'is_default' => '1', - 'is_reserved' => 1, + 'is_reserved' => 0, ]; try { @@ -56,14 +56,15 @@ function message_template_create_expectedresult() { 'values' => [ '69' => [ 'id' => '69', - 'msg_title' => 'msg_title_471', - 'msg_subject' => 'msg_subject_471', - 'msg_text' => 'msg_text_471', - 'msg_html' => 'msg_html_471', + 'msg_title' => 'msg_title_356', + 'msg_subject' => 'msg_subject_356', + 'msg_text' => 'msg_text_356', + 'msg_html' => 'msg_html_356', 'is_active' => '1', - 'workflow_id' => '471', + 'workflow_id' => '356', + 'workflow_name' => '', 'is_default' => '1', - 'is_reserved' => '1', + 'is_reserved' => 0, 'is_sms' => '', 'pdf_format_id' => '', ], diff --git a/api/v3/examples/MessageTemplate/Get.ex.php b/api/v3/examples/MessageTemplate/Get.ex.php index f52c9af958..6763b823e2 100644 --- a/api/v3/examples/MessageTemplate/Get.ex.php +++ b/api/v3/examples/MessageTemplate/Get.ex.php @@ -12,13 +12,13 @@ */ function message_template_get_example() { $params = [ - 'msg_title' => 'msg_title_472', - 'msg_subject' => 'msg_subject_472', - 'msg_text' => 'msg_text_472', - 'msg_html' => 'msg_html_472', - 'workflow_name' => 'contribution_online_invoice', + 'msg_title' => 'msg_title_357', + 'msg_subject' => 'msg_subject_357', + 'msg_text' => 'msg_text_357', + 'msg_html' => 'msg_html_357', + 'workflow_id' => 357, 'is_default' => '1', - 'is_reserved' => 1, + 'is_reserved' => 0, ]; try { @@ -56,16 +56,17 @@ function message_template_get_expectedresult() { 'values' => [ '70' => [ 'id' => '70', - 'msg_title' => 'msg_title_472', - 'msg_subject' => 'msg_subject_472', - 'msg_text' => 'msg_text_472', - 'msg_html' => 'msg_html_472', + 'msg_title' => 'msg_title_357', + 'msg_subject' => 'msg_subject_357', + 'msg_text' => 'msg_text_357', + 'msg_html' => 'msg_html_357', 'is_active' => '1', - 'workflow_id' => '472', + 'workflow_id' => '357', + 'workflow_name' => 'workflow_name_357', 'is_default' => '1', - 'is_reserved' => '1', + 'is_reserved' => 0, 'is_sms' => 0, - 'pdf_format_id' => '472', + 'pdf_format_id' => '357', ], ], ]; diff --git a/api/v3/examples/Note/Create.ex.php b/api/v3/examples/Note/Create.ex.php index 922f9b323f..d56eb91842 100644 --- a/api/v3/examples/Note/Create.ex.php +++ b/api/v3/examples/Note/Create.ex.php @@ -16,6 +16,8 @@ function note_create_example() { 'entity_id' => 15, 'note' => 'Hello!!! m testing Note', 'contact_id' => 15, + 'created_date' => '2012-01-17 13:04:50', + 'note_date' => '2012-01-17 13:04:50', 'modified_date' => '2011-01-31', 'subject' => 'Test Note', ]; @@ -59,6 +61,8 @@ function note_create_expectedresult() { 'entity_id' => '15', 'note' => 'Hello!!! m testing Note', 'contact_id' => '15', + 'note_date' => '20120117130450', + 'created_date' => '2013-07-28 08:49:19', 'modified_date' => '2012-11-14 16:02:35', 'subject' => 'Test Note', 'privacy' => 0, diff --git a/api/v3/examples/Note/Delete.ex.php b/api/v3/examples/Note/Delete.ex.php index 1065511279..808d1eb5bc 100644 --- a/api/v3/examples/Note/Delete.ex.php +++ b/api/v3/examples/Note/Delete.ex.php @@ -12,7 +12,7 @@ */ function note_delete_example() { $params = [ - 'id' => 32, + 'id' => 35, ]; try { diff --git a/api/v3/examples/OpenID/Create.ex.php b/api/v3/examples/OpenID/Create.ex.php index 8c0aba5c77..578297d5cd 100644 --- a/api/v3/examples/OpenID/Create.ex.php +++ b/api/v3/examples/OpenID/Create.ex.php @@ -14,6 +14,7 @@ function open_i_d_create_example() { $params = [ 'contact_id' => 5, 'openid' => 'My OpenID handle', + 'sequential' => 1, ]; try { @@ -47,15 +48,15 @@ function open_i_d_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', + '0' => [ + 'id' => '3', 'contact_id' => '5', 'location_type_id' => '1', 'openid' => 'My OpenID handle', 'allowed_to_login' => '', - 'is_primary' => '', + 'is_primary' => '1', ], ], ]; diff --git a/api/v3/examples/OpenID/Delete.ex.php b/api/v3/examples/OpenID/Delete.ex.php index 76ebc15ec1..b5665d6820 100644 --- a/api/v3/examples/OpenID/Delete.ex.php +++ b/api/v3/examples/OpenID/Delete.ex.php @@ -12,7 +12,7 @@ */ function open_i_d_delete_example() { $params = [ - 'id' => 4, + 'id' => 7, ]; try { diff --git a/api/v3/examples/OpenID/Get.ex.php b/api/v3/examples/OpenID/Get.ex.php index 830af99a11..e820524707 100644 --- a/api/v3/examples/OpenID/Get.ex.php +++ b/api/v3/examples/OpenID/Get.ex.php @@ -15,6 +15,7 @@ function open_i_d_get_example() { 'contact_id' => 7, 'openid' => 'My OpenID handle', 'location_type_id' => 1, + 'sequential' => 1, ]; try { @@ -48,15 +49,15 @@ function open_i_d_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 5, 'values' => [ - '3' => [ - 'id' => '3', + '0' => [ + 'id' => '5', 'contact_id' => '7', 'location_type_id' => '1', 'openid' => 'My OpenID handle', 'allowed_to_login' => 0, - 'is_primary' => 0, + 'is_primary' => '1', ], ], ]; diff --git a/api/v3/examples/OptionGroup/Create.ex.php b/api/v3/examples/OptionGroup/Create.ex.php index 00b6ad591e..54a7c59a94 100644 --- a/api/v3/examples/OptionGroup/Create.ex.php +++ b/api/v3/examples/OptionGroup/Create.ex.php @@ -67,7 +67,7 @@ function option_group_create_expectedresult() { 'is_reserved' => '1', 'is_active' => '1', 'is_locked' => '', - 'api.OptionValue.create' => 869, + 'api.OptionValue.create' => 859, ], ], ]; diff --git a/api/v3/examples/Order/Cancel.ex.php b/api/v3/examples/Order/Cancel.ex.php index 322d0860da..fa2a1f7ffe 100644 --- a/api/v3/examples/Order/Cancel.ex.php +++ b/api/v3/examples/Order/Cancel.ex.php @@ -50,7 +50,7 @@ function order_cancel_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '16', + 'contact_id' => '55', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -76,8 +76,8 @@ function order_cancel_expectedresult() { 'address_id' => '', 'check_number' => '', 'campaign_id' => '', - 'creditnote_id' => '1', - 'tax_amount' => '', + 'creditnote_id' => 'CN_1', + 'tax_amount' => '0.00', 'revenue_recognition_date' => '', 'is_template' => 0, 'contribution_type_id' => '1', diff --git a/api/v3/examples/Order/Create.ex.php b/api/v3/examples/Order/Create.ex.php index 0651545e8b..946df2862c 100644 --- a/api/v3/examples/Order/Create.ex.php +++ b/api/v3/examples/Order/Create.ex.php @@ -12,7 +12,7 @@ */ function order_create_example() { $params = [ - 'contact_id' => 3, + 'contact_id' => 10, 'receive_date' => '2010-01-20', 'financial_type_id' => 'Event Fee', 'contribution_status_id' => 'Pending', @@ -33,7 +33,7 @@ function order_create_example() { ], ], 'params' => [ - 'contact_id' => 3, + 'contact_id' => 10, 'membership_type_id' => 2, 'join_date' => '2006-01-21', 'start_date' => '2006-01-21', @@ -80,7 +80,7 @@ function order_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '3', + 'contact_id' => '10', 'financial_type_id' => '4', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -107,10 +107,26 @@ function order_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', 'is_template' => '', 'contribution_type_id' => '4', + 'line_item' => [ + '0' => [ + 'price_field_id' => '4', + 'price_field_value_id' => '5', + 'label' => 'Price Field 2', + 'field_title' => 'Price Field 2', + 'qty' => '1', + 'unit_price' => '200.000000000', + 'line_total' => '200.000000000', + 'financial_type_id' => '4', + 'entity_table' => 'civicrm_membership', + 'membership_type_id' => '1', + 'tax_amount' => 0, + 'entity_id' => '1', + ], + ], ], ], ]; diff --git a/api/v3/examples/Order/CreateOrderParticipant.ex.php b/api/v3/examples/Order/CreateOrderParticipant.ex.php index dcfcc3b43f..0eab7fdce9 100644 --- a/api/v3/examples/Order/CreateOrderParticipant.ex.php +++ b/api/v3/examples/Order/CreateOrderParticipant.ex.php @@ -14,7 +14,7 @@ */ function order_create_example() { $params = [ - 'contact_id' => 11, + 'contact_id' => 41, 'receive_date' => '2010-01-20', 'financial_type_id' => 1, 'contribution_status_id' => 'Pending', @@ -45,7 +45,7 @@ function order_create_example() { ], ], 'params' => [ - 'contact_id' => 11, + 'contact_id' => 41, 'event_id' => 1, 'role_id' => 1, 'register_date' => '2007-07-21 00:00:00', @@ -90,7 +90,7 @@ function order_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id' => '11', + 'contact_id' => '41', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -117,10 +117,38 @@ function order_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '', + 'tax_amount' => 0, 'revenue_recognition_date' => '', 'is_template' => '', 'contribution_type_id' => '1', + 'line_item' => [ + '0' => [ + 'price_field_id' => '2', + 'price_field_value_id' => '2', + 'label' => 'Price Field 1', + 'field_title' => 'Price Field 1', + 'qty' => '1', + 'unit_price' => '100.000000000', + 'line_total' => '100.000000000', + 'financial_type_id' => '4', + 'entity_table' => 'civicrm_participant', + 'tax_amount' => 0, + 'entity_id' => '1', + ], + '1' => [ + 'price_field_id' => '2', + 'price_field_value_id' => '3', + 'label' => 'Price Field 2', + 'field_title' => 'Price Field 2', + 'qty' => '1', + 'unit_price' => '200.000000000', + 'line_total' => '200.000000000', + 'financial_type_id' => '4', + 'entity_table' => 'civicrm_participant', + 'tax_amount' => 0, + 'entity_id' => '1', + ], + ], ], ], ]; diff --git a/api/v3/examples/Order/Get.ex.php b/api/v3/examples/Order/Get.ex.php index 624434f301..ba6353586f 100644 --- a/api/v3/examples/Order/Get.ex.php +++ b/api/v3/examples/Order/Get.ex.php @@ -107,6 +107,7 @@ function order_get_expectedresult() { 'price_field_value_id' => '1', 'financial_type_id' => '1', 'non_deductible_amount' => '0.00', + 'tax_amount' => '0.00', 'contribution_type_id' => '1', ], ], diff --git a/api/v3/examples/Participant/Create.ex.php b/api/v3/examples/Participant/Create.ex.php index adf8f1bb84..27005da491 100644 --- a/api/v3/examples/Participant/Create.ex.php +++ b/api/v3/examples/Participant/Create.ex.php @@ -12,7 +12,7 @@ */ function participant_create_example() { $params = [ - 'contact_id' => 2, + 'contact_id' => 4, 'event_id' => 3, 'status_id' => 1, 'role_id' => 1, @@ -56,7 +56,7 @@ function participant_create_expectedresult() { 'values' => [ '4' => [ 'id' => '4', - 'contact_id' => '2', + 'contact_id' => '4', 'event_id' => '3', 'status_id' => '1', 'role_id' => '1', diff --git a/api/v3/examples/Participant/Get.ex.php b/api/v3/examples/Participant/Get.ex.php index 4f17045af2..0d8c637151 100644 --- a/api/v3/examples/Participant/Get.ex.php +++ b/api/v3/examples/Participant/Get.ex.php @@ -49,7 +49,7 @@ function participant_get_expectedresult() { 'id' => 1, 'values' => [ '1' => [ - 'contact_id' => '2', + 'contact_id' => '4', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', diff --git a/api/v3/examples/Participant/NestedDelete.ex.php b/api/v3/examples/Participant/NestedDelete.ex.php index 952a7e7482..cf785d31e0 100644 --- a/api/v3/examples/Participant/NestedDelete.ex.php +++ b/api/v3/examples/Participant/NestedDelete.ex.php @@ -14,7 +14,7 @@ */ function participant_get_example() { $params = [ - 'contact_id' => 4, + 'contact_id' => 6, 'api.participant.delete' => 1, ]; @@ -51,12 +51,12 @@ function participant_get_expectedresult() { 'count' => 2, 'values' => [ '2' => [ - 'contact_id' => '4', + 'contact_id' => '6', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '42', + 'event_id' => '40', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', @@ -87,12 +87,12 @@ function participant_get_expectedresult() { ], ], '3' => [ - 'contact_id' => '4', + 'contact_id' => '6', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '42', + 'event_id' => '40', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', diff --git a/api/v3/examples/Participant/NestedEventGet.ex.php b/api/v3/examples/Participant/NestedEventGet.ex.php index d7b2a6ce40..6862b98c28 100644 --- a/api/v3/examples/Participant/NestedEventGet.ex.php +++ b/api/v3/examples/Participant/NestedEventGet.ex.php @@ -52,7 +52,7 @@ function participant_get_expectedresult() { 'id' => 1, 'values' => [ '1' => [ - 'contact_id' => '2', + 'contact_id' => '4', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', @@ -91,8 +91,8 @@ function participant_get_expectedresult() { 'title' => 'Annual CiviCRM meet', 'event_title' => 'Annual CiviCRM meet', 'summary' => 'If you have any CiviCRM related issues or want to track where CiviCRM is heading, Sign up now', - 'description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues', - 'event_description' => 'This event is intended to give brief idea about progess of CiviCRM and giving solutions to common user issues', + 'description' => 'This event is intended to give brief idea about progress of CiviCRM and giving solutions to common user issues', + 'event_description' => 'This event is intended to give brief idea about progress of CiviCRM and giving solutions to common user issues', 'event_type_id' => '1', 'is_public' => '1', 'start_date' => '2013-07-29 00:00:00', diff --git a/api/v3/examples/ParticipantPayment/Create.ex.php b/api/v3/examples/ParticipantPayment/Create.ex.php index c9c86bf8ad..e00d13fcde 100644 --- a/api/v3/examples/ParticipantPayment/Create.ex.php +++ b/api/v3/examples/ParticipantPayment/Create.ex.php @@ -12,7 +12,7 @@ */ function participant_payment_create_example() { $params = [ - 'participant_id' => 13, + 'participant_id' => 1, 'contribution_id' => 1, ]; @@ -51,7 +51,7 @@ function participant_payment_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'participant_id' => '13', + 'participant_id' => '1', 'contribution_id' => '1', ], ], diff --git a/api/v3/examples/ParticipantPayment/Get.ex.php b/api/v3/examples/ParticipantPayment/Get.ex.php index f888fe790e..aeba37e143 100644 --- a/api/v3/examples/ParticipantPayment/Get.ex.php +++ b/api/v3/examples/ParticipantPayment/Get.ex.php @@ -12,7 +12,7 @@ */ function participant_payment_get_example() { $params = [ - 'participant_id' => 68, + 'participant_id' => 32, 'contribution_id' => 7, ]; @@ -51,7 +51,7 @@ function participant_payment_get_expectedresult() { 'values' => [ '7' => [ 'id' => '7', - 'participant_id' => '68', + 'participant_id' => '32', 'contribution_id' => '7', ], ], diff --git a/api/v3/examples/Payment/Cancel.ex.php b/api/v3/examples/Payment/Cancel.ex.php index b721140bcc..93fda68e28 100644 --- a/api/v3/examples/Payment/Cancel.ex.php +++ b/api/v3/examples/Payment/Cancel.ex.php @@ -12,7 +12,7 @@ */ function payment_cancel_example() { $params = [ - 'id' => 2, + 'id' => 1, 'check_permissions' => TRUE, ]; @@ -47,15 +47,15 @@ function payment_cancel_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 2, 'values' => [ - '3' => [ - 'id' => '3', + '2' => [ + 'id' => '2', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20190820192757', + 'trxn_date' => '20220117131002', 'total_amount' => '-150', - 'fee_amount' => '0.00', + 'fee_amount' => 0, 'net_amount' => '-150', 'currency' => 'USD', 'is_payment' => '1', diff --git a/api/v3/examples/Payment/Create.ex.php b/api/v3/examples/Payment/Create.ex.php index a80d4873b6..7f4304ca59 100644 --- a/api/v3/examples/Payment/Create.ex.php +++ b/api/v3/examples/Payment/Create.ex.php @@ -47,15 +47,15 @@ function payment_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 2, 'values' => [ - '3' => [ - 'id' => '3', + '2' => [ + 'id' => '2', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20190820192755', + 'trxn_date' => '20220117130949', 'total_amount' => '50', - 'fee_amount' => '', + 'fee_amount' => 0, 'net_amount' => '50', 'currency' => 'USD', 'is_payment' => '1', diff --git a/api/v3/examples/Payment/CreatePaymentWithLineItems.ex.php b/api/v3/examples/Payment/CreatePaymentWithLineItems.ex.php index e395d59340..c907cf1747 100644 --- a/api/v3/examples/Payment/CreatePaymentWithLineItems.ex.php +++ b/api/v3/examples/Payment/CreatePaymentWithLineItems.ex.php @@ -57,15 +57,15 @@ function payment_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 2, 'values' => [ - '3' => [ - 'id' => '3', + '2' => [ + 'id' => '2', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20190820192756', + 'trxn_date' => '20220117130953', 'total_amount' => '50', - 'fee_amount' => '', + 'fee_amount' => 0, 'net_amount' => '50', 'currency' => 'USD', 'is_payment' => '1', diff --git a/api/v3/examples/Payment/Delete.ex.php b/api/v3/examples/Payment/Delete.ex.php index 79f58c5eed..7878115133 100644 --- a/api/v3/examples/Payment/Delete.ex.php +++ b/api/v3/examples/Payment/Delete.ex.php @@ -12,7 +12,7 @@ */ function payment_delete_example() { $params = [ - 'id' => 2, + 'id' => '1', 'check_permissions' => TRUE, ]; diff --git a/api/v3/examples/Payment/UpdatePayment.ex.php b/api/v3/examples/Payment/UpdatePayment.ex.php index a91340e6fc..6802716ea9 100644 --- a/api/v3/examples/Payment/UpdatePayment.ex.php +++ b/api/v3/examples/Payment/UpdatePayment.ex.php @@ -16,7 +16,7 @@ function payment_create_example() { $params = [ 'contribution_id' => 1, 'total_amount' => 100, - 'id' => 3, + 'id' => 2, 'check_permissions' => TRUE, ]; @@ -51,15 +51,15 @@ function payment_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 5, + 'id' => 4, 'values' => [ - '5' => [ - 'id' => '5', + '4' => [ + 'id' => '4', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20190820192758', + 'trxn_date' => '', 'total_amount' => '100', - 'fee_amount' => '', + 'fee_amount' => 0, 'net_amount' => '100', 'currency' => 'USD', 'is_payment' => '1', diff --git a/api/v3/examples/PaymentProcessor/Create.ex.php b/api/v3/examples/PaymentProcessor/Create.ex.php index f96685a43d..69ee100f1d 100644 --- a/api/v3/examples/PaymentProcessor/Create.ex.php +++ b/api/v3/examples/PaymentProcessor/Create.ex.php @@ -74,7 +74,7 @@ function payment_processor_create_expectedresult() { 'billing_mode' => '1', 'is_recur' => 0, 'payment_type' => '1', - 'payment_instrument_id' => '1', + 'payment_instrument_id' => '2', 'accepted_credit_cards' => '', ], ], diff --git a/api/v3/examples/PaymentProcessor/Delete.ex.php b/api/v3/examples/PaymentProcessor/Delete.ex.php index b6d274bf2b..5277566504 100644 --- a/api/v3/examples/PaymentProcessor/Delete.ex.php +++ b/api/v3/examples/PaymentProcessor/Delete.ex.php @@ -12,7 +12,7 @@ */ function payment_processor_delete_example() { $params = [ - 'id' => 3, + 'id' => 5, ]; try { diff --git a/api/v3/examples/PaymentProcessorType/Create.ex.php b/api/v3/examples/PaymentProcessorType/Create.ex.php index 6f6090e93d..77b7384b19 100644 --- a/api/v3/examples/PaymentProcessorType/Create.ex.php +++ b/api/v3/examples/PaymentProcessorType/Create.ex.php @@ -51,10 +51,10 @@ function payment_processor_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 13, + 'id' => 10, 'values' => [ '0' => [ - 'id' => '13', + 'id' => '10', 'name' => 'API_Test_PP', 'title' => 'API Test Payment Processor', 'description' => '', diff --git a/api/v3/examples/PaymentProcessorType/Delete.ex.php b/api/v3/examples/PaymentProcessorType/Delete.ex.php index 62072a71d1..ce41157b04 100644 --- a/api/v3/examples/PaymentProcessorType/Delete.ex.php +++ b/api/v3/examples/PaymentProcessorType/Delete.ex.php @@ -12,7 +12,7 @@ */ function payment_processor_type_delete_example() { $params = [ - 'id' => 15, + 'id' => 13, ]; try { diff --git a/api/v3/examples/PaymentToken/Create.ex.php b/api/v3/examples/PaymentToken/Create.ex.php index bdc24d8049..53dc8ae162 100644 --- a/api/v3/examples/PaymentToken/Create.ex.php +++ b/api/v3/examples/PaymentToken/Create.ex.php @@ -7,7 +7,7 @@ /** * Test Generated example demonstrating the PaymentToken.create API. * - * Create a payment token - Note use of relative dates here: + * Create a payment token - Note use of relative dates here:. * @link http://www.php.net/manual/en/datetime.formats.relative.php. * * @return array @@ -16,9 +16,9 @@ function payment_token_create_example() { $params = [ 'token' => 'fancy-token-xxxx', - 'contact_id' => 3, - 'created_id' => 3, - 'payment_processor_id' => 1, + 'contact_id' => 4, + 'created_id' => 4, + 'payment_processor_id' => 2, ]; try { @@ -52,15 +52,15 @@ function payment_token_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 2, 'values' => [ - '1' => [ - 'id' => '1', - 'contact_id' => '3', - 'payment_processor_id' => '1', + '2' => [ + 'id' => '2', + 'contact_id' => '4', + 'payment_processor_id' => '2', 'token' => 'fancy-token-xxxx', 'created_date' => '2013-07-28 08:49:19', - 'created_id' => '3', + 'created_id' => '4', 'expiry_date' => '', 'email' => '', 'billing_first_name' => '', diff --git a/api/v3/examples/PaymentToken/Delete.ex.php b/api/v3/examples/PaymentToken/Delete.ex.php index e27c1611a8..03d7fb263d 100644 --- a/api/v3/examples/PaymentToken/Delete.ex.php +++ b/api/v3/examples/PaymentToken/Delete.ex.php @@ -12,7 +12,7 @@ */ function payment_token_delete_example() { $params = [ - 'id' => 3, + 'id' => 6, ]; try { diff --git a/api/v3/examples/PaymentToken/Get.ex.php b/api/v3/examples/PaymentToken/Get.ex.php index 3308b71944..fd3b33ba71 100644 --- a/api/v3/examples/PaymentToken/Get.ex.php +++ b/api/v3/examples/PaymentToken/Get.ex.php @@ -13,9 +13,9 @@ function payment_token_get_example() { $params = [ 'token' => 'fancy-token-xxxx', - 'contact_id' => 4, - 'created_id' => 4, - 'payment_processor_id' => 2, + 'contact_id' => 6, + 'created_id' => 6, + 'payment_processor_id' => 4, ]; try { @@ -49,15 +49,15 @@ function payment_token_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 4, 'values' => [ - '2' => [ - 'id' => '2', - 'contact_id' => '4', - 'payment_processor_id' => '2', + '4' => [ + 'id' => '4', + 'contact_id' => '6', + 'payment_processor_id' => '4', 'token' => 'fancy-token-xxxx', 'created_date' => '2013-07-28 08:49:19', - 'created_id' => '4', + 'created_id' => '6', ], ], ]; diff --git a/api/v3/examples/Phone/Create.ex.php b/api/v3/examples/Phone/Create.ex.php index 0c055c3cd0..95eab5a783 100644 --- a/api/v3/examples/Phone/Create.ex.php +++ b/api/v3/examples/Phone/Create.ex.php @@ -14,7 +14,7 @@ function phone_create_example() { $params = [ 'contact_id' => 5, 'phone' => '(123) 456-7890', - 'is_primary' => 1, + 'is_primary' => TRUE, 'phone_type_id' => 1, ]; @@ -49,10 +49,10 @@ function phone_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 4, 'values' => [ - '3' => [ - 'id' => '3', + '4' => [ + 'id' => '4', 'contact_id' => '5', 'location_type_id' => '1', 'is_primary' => '1', diff --git a/api/v3/examples/Phone/Delete.ex.php b/api/v3/examples/Phone/Delete.ex.php index aff2ed5ad9..44fa2491fa 100644 --- a/api/v3/examples/Phone/Delete.ex.php +++ b/api/v3/examples/Phone/Delete.ex.php @@ -12,7 +12,7 @@ */ function phone_delete_example() { $params = [ - 'id' => 4, + 'id' => 6, ]; try { diff --git a/api/v3/examples/Phone/Get.ex.php b/api/v3/examples/Phone/Get.ex.php index e8e9d5226d..981506ad46 100644 --- a/api/v3/examples/Phone/Get.ex.php +++ b/api/v3/examples/Phone/Get.ex.php @@ -47,10 +47,10 @@ function phone_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 5, + 'id' => 8, 'values' => [ - '5' => [ - 'id' => '5', + '8' => [ + 'id' => '8', 'contact_id' => '12', 'location_type_id' => '15', 'is_primary' => '1', diff --git a/api/v3/examples/Pledge/Create.ex.php b/api/v3/examples/Pledge/Create.ex.php index 81769b6971..53f81be28f 100644 --- a/api/v3/examples/Pledge/Create.ex.php +++ b/api/v3/examples/Pledge/Create.ex.php @@ -13,9 +13,9 @@ function pledge_create_example() { $params = [ 'contact_id' => 12, - 'pledge_create_date' => '20190820', - 'start_date' => '20190820', - 'scheduled_date' => '20190822', + 'pledge_create_date' => '20220117', + 'start_date' => '20220117', + 'scheduled_date' => '20220119', 'amount' => '100', 'pledge_status_id' => '2', 'pledge_financial_type_id' => '1', diff --git a/api/v3/examples/Pledge/Get.ex.php b/api/v3/examples/Pledge/Get.ex.php index ac0ecf3d77..99ba597bd6 100644 --- a/api/v3/examples/Pledge/Get.ex.php +++ b/api/v3/examples/Pledge/Get.ex.php @@ -56,11 +56,11 @@ function pledge_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '1', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2019-08-20 00:00:00', - 'pledge_start_date' => '2019-08-20 00:00:00', - 'pledge_status' => 'Pending', + 'pledge_create_date' => '2022-01-17 00:00:00', + 'pledge_start_date' => '2022-01-17 00:00:00', + 'pledge_status' => 'Pending Label**', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2019-08-22 00:00:00', + 'pledge_next_pay_date' => '2022-01-19 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '', 'pledge_financial_type' => 'Donation', diff --git a/api/v3/examples/Pledge/GetFilterHighDate.ex.php b/api/v3/examples/Pledge/GetFilterHighDate.ex.php index af63369e64..612e701095 100644 --- a/api/v3/examples/Pledge/GetFilterHighDate.ex.php +++ b/api/v3/examples/Pledge/GetFilterHighDate.ex.php @@ -7,14 +7,14 @@ /** * Test Generated example demonstrating the Pledge.get API. * - * Demonstrates high date filter. + * demonstrates high date filter. * * @return array * API result array */ function pledge_get_example() { $params = [ - 'pledge_start_date_high' => '20190818192828', + 'pledge_start_date_high' => '20220115131204', ]; try { @@ -58,11 +58,11 @@ function pledge_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '2', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2019-08-20 00:00:00', - 'pledge_start_date' => '2018-03-02 00:00:00', + 'pledge_create_date' => '2022-01-17 00:00:00', + 'pledge_start_date' => '2021-03-05 00:00:00', 'pledge_status' => 'Overdue', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2018-03-02 00:00:00', + 'pledge_next_pay_date' => '2021-03-05 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '20.00', 'pledge_financial_type' => 'Donation', diff --git a/api/v3/examples/PriceField/Delete.ex.php b/api/v3/examples/PriceField/Delete.ex.php index 46fb4c444a..b8b136acaf 100644 --- a/api/v3/examples/PriceField/Delete.ex.php +++ b/api/v3/examples/PriceField/Delete.ex.php @@ -12,7 +12,7 @@ */ function price_field_delete_example() { $params = [ - 'id' => 4, + 'id' => 6, ]; try { diff --git a/api/v3/examples/PriceSet/Create.ex.php b/api/v3/examples/PriceSet/Create.ex.php index 3955383c85..ade9452b33 100644 --- a/api/v3/examples/PriceSet/Create.ex.php +++ b/api/v3/examples/PriceSet/Create.ex.php @@ -50,10 +50,10 @@ function price_set_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 20, + 'id' => 6, 'values' => [ - '20' => [ - 'id' => '20', + '6' => [ + 'id' => '6', 'domain_id' => '', 'name' => 'event price', 'title' => 'event price', diff --git a/api/v3/examples/PriceSet/Delete.ex.php b/api/v3/examples/PriceSet/Delete.ex.php index b0c90efdca..2fdb2dfe25 100644 --- a/api/v3/examples/PriceSet/Delete.ex.php +++ b/api/v3/examples/PriceSet/Delete.ex.php @@ -12,7 +12,7 @@ */ function price_set_delete_example() { $params = [ - 'id' => 21, + 'id' => 7, ]; try { diff --git a/api/v3/examples/PriceSet/Get.ex.php b/api/v3/examples/PriceSet/Get.ex.php index cb4623e6a1..9b9eac2ff3 100644 --- a/api/v3/examples/PriceSet/Get.ex.php +++ b/api/v3/examples/PriceSet/Get.ex.php @@ -56,7 +56,7 @@ function price_set_get_expectedresult() { 'extends' => '2', 'is_quick_config' => '1', 'is_reserved' => '1', - 'min_amount' => 0, + 'min_amount' => '0.00', 'entity' => [], ], ], diff --git a/api/v3/examples/Profile/Apply.ex.php b/api/v3/examples/Profile/Apply.ex.php index b94ef64b29..0ec9137f6d 100644 --- a/api/v3/examples/Profile/Apply.ex.php +++ b/api/v3/examples/Profile/Apply.ex.php @@ -12,7 +12,7 @@ */ function profile_apply_example() { $params = [ - 'profile_id' => 30, + 'profile_id' => 31, 'contact_id' => 5, 'first_name' => 'abc2', 'last_name' => 'xyz2', @@ -59,7 +59,7 @@ function profile_apply_expectedresult() { 'contact_id' => 5, 'version' => 3, 'debug' => 1, - 'profile_id' => 30, + 'profile_id' => 31, 'first_name' => 'abc2', 'last_name' => 'xyz2', 'email' => [ diff --git a/api/v3/examples/Profile/Get.ex.php b/api/v3/examples/Profile/Get.ex.php index 17c69e3ab1..b264dc7e96 100644 --- a/api/v3/examples/Profile/Get.ex.php +++ b/api/v3/examples/Profile/Get.ex.php @@ -13,7 +13,7 @@ function profile_get_example() { $params = [ 'profile_id' => [ - '0' => 15, + '0' => 16, '1' => 1, '2' => 'Billing', ], @@ -52,7 +52,7 @@ function profile_get_expectedresult() { 'version' => 3, 'count' => 3, 'values' => [ - '15' => [ + '16' => [ 'postal_code-1' => '90210', 'state_province-1' => '1021', 'country-1' => '1228', diff --git a/api/v3/examples/Profile/GetFields.ex.php b/api/v3/examples/Profile/GetFields.ex.php index 45fe926792..ee57a5e603 100644 --- a/api/v3/examples/Profile/GetFields.ex.php +++ b/api/v3/examples/Profile/GetFields.ex.php @@ -7,7 +7,7 @@ /** * Test Generated example demonstrating the Profile.getfields API. * - * Demonstrates retrieving profile fields passing in an id. + * demonstrates retrieving profile fields passing in an id. * * @return array * API result array @@ -15,7 +15,7 @@ function profile_getfields_example() { $params = [ 'action' => 'submit', - 'profile_id' => 22, + 'profile_id' => 23, ]; try { @@ -77,6 +77,7 @@ function profile_getfields_expectedresult() { 'is_required' => 0, 'table_name' => 'civicrm_value__addcustomfie_1', 'column_name' => '_addcustomfieldtoprofile_1', + 'serialize' => 0, 'where' => 'civicrm_value__addcustomfie_1._addcustomfieldtoprofile_1', 'extends_table' => 'civicrm_contact', 'search_table' => 'contact_a', @@ -108,6 +109,7 @@ function profile_getfields_expectedresult() { 'maxlength' => 64, 'size' => 6, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => 0, 'help_pre' => '', @@ -129,6 +131,8 @@ function profile_getfields_expectedresult() { 'FKClassName' => 'CRM_Core_DAO_StateProvince', 'html' => [ 'type' => 'ChainSelect', + 'label' => 'State/Province', + 'controlField' => 'country_id', 'size' => 6, 'maxlength' => 14, ], @@ -136,7 +140,9 @@ function profile_getfields_expectedresult() { 'table' => 'civicrm_state_province', 'keyColumn' => 'id', 'labelColumn' => 'name', + 'abbrColumn' => 'abbreviation', ], + 'add' => '1.1', 'is_core_field' => TRUE, 'FKApiName' => 'StateProvince', 'api.required' => '1', @@ -159,6 +165,7 @@ function profile_getfields_expectedresult() { 'FKClassName' => 'CRM_Core_DAO_Country', 'html' => [ 'type' => 'Select', + 'label' => 'Country', 'size' => 6, 'maxlength' => 14, ], @@ -169,6 +176,7 @@ function profile_getfields_expectedresult() { 'nameColumn' => 'iso_code', 'abbrColumn' => 'iso_code', ], + 'add' => '1.1', 'is_core_field' => TRUE, 'FKApiName' => 'Country', 'api.required' => '1', @@ -195,9 +203,11 @@ function profile_getfields_expectedresult() { 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Phone', 'maxlength' => 32, 'size' => 20, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', @@ -227,6 +237,7 @@ function profile_getfields_expectedresult() { 'maxlength' => 254, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', @@ -248,15 +259,18 @@ function profile_getfields_expectedresult() { 'headerPattern' => '/^last|(l(ast\\s)?name)$/i', 'dataPattern' => '/^\\w+(\\s\\w+)?+$/', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'Last Name', 'maxlength' => 64, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', @@ -276,15 +290,18 @@ function profile_getfields_expectedresult() { 'headerPattern' => '/^first|(f(irst\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'contactType' => 'Individual', 'table_name' => 'civicrm_contact', 'entity' => 'contact', 'bao' => 'CRM_Contact_BAO_Contact', 'localizable' => 0, 'html' => [ 'type' => 'Text', + 'label' => 'First Name', 'maxlength' => 64, 'size' => 30, ], + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => '1', 'help_pre' => '', diff --git a/api/v3/examples/Profile/Submit.ex.php b/api/v3/examples/Profile/Submit.ex.php index 0677c7042b..841fcb32a2 100644 --- a/api/v3/examples/Profile/Submit.ex.php +++ b/api/v3/examples/Profile/Submit.ex.php @@ -12,7 +12,7 @@ */ function profile_submit_example() { $params = [ - 'profile_id' => 24, + 'profile_id' => 25, 'contact_id' => 5, 'first_name' => 'abc2', 'last_name' => 'xyz2', diff --git a/api/v3/examples/Relationship/BetweenRelationshipType.ex.php b/api/v3/examples/Relationship/BetweenRelationshipType.ex.php index 5344b7b57c..0b50ad12b3 100644 --- a/api/v3/examples/Relationship/BetweenRelationshipType.ex.php +++ b/api/v3/examples/Relationship/BetweenRelationshipType.ex.php @@ -16,8 +16,8 @@ function relationship_get_example() { $params = [ 'relationship_type_id' => [ 'BETWEEN' => [ - '0' => 36, - '1' => 38, + '0' => 56, + '1' => 58, ], ], ]; @@ -56,9 +56,9 @@ function relationship_get_expectedresult() { 'values' => [ '2' => [ 'id' => '2', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '36', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '56', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -66,9 +66,9 @@ function relationship_get_expectedresult() { ], '3' => [ 'id' => '3', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '37', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '57', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -76,9 +76,9 @@ function relationship_get_expectedresult() { ], '4' => [ 'id' => '4', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '38', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '58', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -97,17 +97,17 @@ function relationship_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/Create.ex.php b/api/v3/examples/Relationship/Create.ex.php index 01554f3706..e405bc51b1 100644 --- a/api/v3/examples/Relationship/Create.ex.php +++ b/api/v3/examples/Relationship/Create.ex.php @@ -12,9 +12,9 @@ */ function relationship_create_example() { $params = [ - 'contact_id_a' => 31, - 'contact_id_b' => 33, - 'relationship_type_id' => 18, + 'contact_id_a' => 3, + 'contact_id_b' => 5, + 'relationship_type_id' => 26, 'start_date' => '2010-10-30', 'end_date' => '2010-12-30', 'is_active' => 1, @@ -56,9 +56,9 @@ function relationship_create_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id_a' => '31', - 'contact_id_b' => '33', - 'relationship_type_id' => '18', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '26', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'is_active' => '1', @@ -80,17 +80,17 @@ function relationship_create_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/Delete.ex.php b/api/v3/examples/Relationship/Delete.ex.php index 745cae5504..0f561e92d5 100644 --- a/api/v3/examples/Relationship/Delete.ex.php +++ b/api/v3/examples/Relationship/Delete.ex.php @@ -59,17 +59,17 @@ function relationship_delete_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/Get.ex.php b/api/v3/examples/Relationship/Get.ex.php index 6e16756334..c3ea39ed3a 100644 --- a/api/v3/examples/Relationship/Get.ex.php +++ b/api/v3/examples/Relationship/Get.ex.php @@ -50,9 +50,9 @@ function relationship_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id_a' => '47', - 'contact_id_b' => '49', - 'relationship_type_id' => '22', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '33', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -73,17 +73,17 @@ function relationship_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/INRelationshipType.ex.php b/api/v3/examples/Relationship/INRelationshipType.ex.php index 6274c2d2fa..74544ef72c 100644 --- a/api/v3/examples/Relationship/INRelationshipType.ex.php +++ b/api/v3/examples/Relationship/INRelationshipType.ex.php @@ -16,8 +16,8 @@ function relationship_get_example() { $params = [ 'relationship_type_id' => [ 'IN' => [ - '0' => 36, - '1' => 37, + '0' => 56, + '1' => 57, ], ], ]; @@ -56,9 +56,9 @@ function relationship_get_expectedresult() { 'values' => [ '2' => [ 'id' => '2', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '36', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '56', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -66,9 +66,9 @@ function relationship_get_expectedresult() { ], '3' => [ 'id' => '3', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '37', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '57', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -87,17 +87,17 @@ function relationship_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/NotBetweenRelationshipType.ex.php b/api/v3/examples/Relationship/NotBetweenRelationshipType.ex.php index d22ca99957..eafff85eff 100644 --- a/api/v3/examples/Relationship/NotBetweenRelationshipType.ex.php +++ b/api/v3/examples/Relationship/NotBetweenRelationshipType.ex.php @@ -16,8 +16,8 @@ function relationship_get_example() { $params = [ 'relationship_type_id' => [ 'NOT BETWEEN' => [ - '0' => 36, - '1' => 38, + '0' => 56, + '1' => 58, ], ], ]; @@ -57,9 +57,9 @@ function relationship_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '35', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '55', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -78,17 +78,17 @@ function relationship_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/NotInRelationshipType.ex.php b/api/v3/examples/Relationship/NotInRelationshipType.ex.php index 6cfeac10c6..2696dada28 100644 --- a/api/v3/examples/Relationship/NotInRelationshipType.ex.php +++ b/api/v3/examples/Relationship/NotInRelationshipType.ex.php @@ -16,8 +16,8 @@ function relationship_get_example() { $params = [ 'relationship_type_id' => [ 'NOT IN' => [ - '0' => 36, - '1' => 37, + '0' => 56, + '1' => 57, ], ], ]; @@ -56,9 +56,9 @@ function relationship_get_expectedresult() { 'values' => [ '1' => [ 'id' => '1', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '35', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '55', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -66,9 +66,9 @@ function relationship_get_expectedresult() { ], '4' => [ 'id' => '4', - 'contact_id_a' => '99', - 'contact_id_b' => '101', - 'relationship_type_id' => '38', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '58', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -87,17 +87,17 @@ function relationship_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/Relationship/filterIsCurrent.ex.php b/api/v3/examples/Relationship/filterIsCurrent.ex.php index abe785db19..5407675555 100644 --- a/api/v3/examples/Relationship/filterIsCurrent.ex.php +++ b/api/v3/examples/Relationship/filterIsCurrent.ex.php @@ -54,9 +54,9 @@ function relationship_get_expectedresult() { 'values' => [ '2' => [ 'id' => '2', - 'contact_id_a' => '95', - 'contact_id_b' => '97', - 'relationship_type_id' => '34', + 'contact_id_a' => '3', + 'contact_id_b' => '5', + 'relationship_type_id' => '53', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', 'is_permission_a_b' => 0, @@ -75,17 +75,17 @@ function relationship_get_expectedresult() { * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/RelationshipTest.php * * You can see the outcome of the API tests at - * https://test.civicrm.org/job/CiviCRM-master-git/ + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ * * To Learn about the API read - * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API + * https://docs.civicrm.org/dev/en/latest/api/ * - * Browse the api on your own site with the api explorer - * http://MYSITE.ORG/path/to/civicrm/api + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. * * Read more about testing here - * http://wiki.civicrm.org/confluence/display/CRM/Testing + * https://docs.civicrm.org/dev/en/latest/testing/ * * API Standards documentation: - * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ */ diff --git a/api/v3/examples/ReportTemplate/Getrows.ex.php b/api/v3/examples/ReportTemplate/Getrows.ex.php index 794d96f552..5441ac2df7 100644 --- a/api/v3/examples/ReportTemplate/Getrows.ex.php +++ b/api/v3/examples/ReportTemplate/Getrows.ex.php @@ -63,6 +63,7 @@ function report_template_getrows_expectedresult() { 'civicrm_mailing_mailing_subject' => 'Hello again, {contact.display_name}', 'civicrm_mailing_event_opened_id' => '17', 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:23:22', + 'class' => '', 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=102', 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], @@ -74,6 +75,7 @@ function report_template_getrows_expectedresult() { 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', 'civicrm_mailing_event_opened_id' => '9', 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:19:03', + 'class' => '', 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=109', 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], @@ -85,6 +87,7 @@ function report_template_getrows_expectedresult() { 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', 'civicrm_mailing_event_opened_id' => '5', 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:17:54', + 'class' => '', 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=110', 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], @@ -96,6 +99,7 @@ function report_template_getrows_expectedresult() { 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', 'civicrm_mailing_event_opened_id' => '15', 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:20:59', + 'class' => '', 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=111', 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], @@ -107,6 +111,7 @@ function report_template_getrows_expectedresult() { 'civicrm_mailing_mailing_subject' => 'Hello {contact.display_name}', 'civicrm_mailing_event_opened_id' => '11', 'civicrm_mailing_event_opened_time_stamp' => '2011-05-26 13:19:44', + 'class' => '', 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/contact/view&reset=1&cid=112', 'civicrm_contact_sort_name_hover' => 'View Contact details for this contact.', ], diff --git a/api/v3/examples/ReportTemplate/Getstatistics.ex.php b/api/v3/examples/ReportTemplate/Getstatistics.ex.php index 69bfe6f9c5..762ecb4309 100644 --- a/api/v3/examples/ReportTemplate/Getstatistics.ex.php +++ b/api/v3/examples/ReportTemplate/Getstatistics.ex.php @@ -47,15 +47,17 @@ function report_template_getstatistics_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 1, - 'id' => 'counts', + 'count' => 3, 'values' => [ 'counts' => [ 'rowCount' => [ 'title' => 'Row(s) Listed', 'value' => 0, + 'type' => 1, ], ], + 'groups' => [], + 'filters' => [], ], ]; diff --git a/api/v3/examples/SavedSearch/Create.ex.php b/api/v3/examples/SavedSearch/Create.ex.php index 0ebc6f040a..8a376d32d5 100644 --- a/api/v3/examples/SavedSearch/Create.ex.php +++ b/api/v3/examples/SavedSearch/Create.ex.php @@ -12,6 +12,7 @@ */ function saved_search_create_example() { $params = [ + 'expires_date' => '2021-08-08', 'form_values' => [ 'relation_type_id' => '6_a_b', 'relation_target_name' => 'Default Organization', @@ -63,12 +64,22 @@ function saved_search_create_expectedresult() { 'values' => [ '3' => [ 'id' => '3', + 'name' => '', + 'label' => '', 'form_values' => [ 'relation_type_id' => '6_a_b', 'relation_target_name' => 'Default Organization', ], 'mapping_id' => '', 'search_custom_id' => '', + 'api_entity' => '', + 'api_params' => '', + 'created_id' => '', + 'modified_id' => '', + 'expires_date' => '20210808000000', + 'created_date' => '', + 'modified_date' => '', + 'description' => '', 'api.Group.create' => [ 'is_error' => 0, 'version' => 3, @@ -84,6 +95,9 @@ function saved_search_create_expectedresult() { 'saved_search_id' => '3', 'is_active' => '1', 'visibility' => 'User and User Admin Only', + 'where_clause' => '', + 'select_tables' => '', + 'where_tables' => '', 'group_type' => '', 'cache_date' => '', 'refresh_date' => '', @@ -93,6 +107,8 @@ function saved_search_create_expectedresult() { 'is_reserved' => 0, 'created_id' => '', 'modified_id' => '', + 'frontend_title' => '', + 'frontend_description' => '', ], ], ], diff --git a/api/v3/examples/SavedSearch/Delete.ex.php b/api/v3/examples/SavedSearch/Delete.ex.php index c2ef3c09ed..37574e701e 100644 --- a/api/v3/examples/SavedSearch/Delete.ex.php +++ b/api/v3/examples/SavedSearch/Delete.ex.php @@ -12,7 +12,7 @@ */ function saved_search_delete_example() { $params = [ - 'id' => 4, + 'id' => 6, ]; try { diff --git a/api/v3/examples/SavedSearch/Get.ex.php b/api/v3/examples/SavedSearch/Get.ex.php index d61a1f57e8..7d948d0a67 100644 --- a/api/v3/examples/SavedSearch/Get.ex.php +++ b/api/v3/examples/SavedSearch/Get.ex.php @@ -54,6 +54,9 @@ function saved_search_get_expectedresult() { 'relation_type_id' => '6_a_b', 'relation_target_name' => 'Default Organization', ], + 'expires_date' => '2021-08-08 00:00:00', + 'created_date' => '2013-07-28 08:49:19', + 'modified_date' => '2012-11-14 16:02:35', ], ], ]; diff --git a/api/v3/examples/Setting/Create.ex.php b/api/v3/examples/Setting/Create.ex.php index 103d282017..7ea582474c 100644 --- a/api/v3/examples/Setting/Create.ex.php +++ b/api/v3/examples/Setting/Create.ex.php @@ -12,7 +12,7 @@ */ function setting_create_example() { $params = [ - 'domain_id' => 2, + 'domain_id' => 21, 'uniq_email_per_site' => 1, ]; @@ -47,9 +47,9 @@ function setting_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 21, 'values' => [ - '2' => [ + '21' => [ 'uniq_email_per_site' => '1', ], ], diff --git a/api/v3/examples/Setting/CreateAllDomains.ex.php b/api/v3/examples/Setting/CreateAllDomains.ex.php index 649f904ce7..f5117e6fe2 100644 --- a/api/v3/examples/Setting/CreateAllDomains.ex.php +++ b/api/v3/examples/Setting/CreateAllDomains.ex.php @@ -48,15 +48,18 @@ function setting_create_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 3, + 'count' => 4, 'values' => [ - '1' => [ + '37' => [ 'uniq_email_per_site' => '1', ], - '2' => [ + '38' => [ + 'uniq_email_per_site' => '1', + ], + '1' => [ 'uniq_email_per_site' => '1', ], - '3' => [ + '2' => [ 'uniq_email_per_site' => '1', ], ], diff --git a/api/v3/examples/Setting/CreateSpecifiedDomains.ex.php b/api/v3/examples/Setting/CreateSpecifiedDomains.ex.php index 40c34b4fe9..9e27e290eb 100644 --- a/api/v3/examples/Setting/CreateSpecifiedDomains.ex.php +++ b/api/v3/examples/Setting/CreateSpecifiedDomains.ex.php @@ -16,7 +16,7 @@ function setting_create_example() { $params = [ 'domain_id' => [ '0' => 1, - '1' => 3, + '1' => 38, ], 'uniq_email_per_site' => 0, ]; @@ -56,7 +56,7 @@ function setting_create_expectedresult() { '1' => [ 'uniq_email_per_site' => 0, ], - '3' => [ + '38' => [ 'uniq_email_per_site' => 0, ], ], diff --git a/api/v3/examples/Setting/Get.ex.php b/api/v3/examples/Setting/Get.ex.php index 90535d41bd..03a62f4028 100644 --- a/api/v3/examples/Setting/Get.ex.php +++ b/api/v3/examples/Setting/Get.ex.php @@ -12,7 +12,7 @@ */ function setting_get_example() { $params = [ - 'domain_id' => 2, + 'domain_id' => 41, 'return' => 'uniq_email_per_site', ]; @@ -47,10 +47,10 @@ function setting_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 41, 'values' => [ - '2' => [ - 'uniq_email_per_site' => '1', + '41' => [ + 'uniq_email_per_site' => 0, ], ], ]; diff --git a/api/v3/examples/Setting/GetAllDomains.ex.php b/api/v3/examples/Setting/GetAllDomains.ex.php index d8323fcfec..d2d96418b1 100644 --- a/api/v3/examples/Setting/GetAllDomains.ex.php +++ b/api/v3/examples/Setting/GetAllDomains.ex.php @@ -48,15 +48,18 @@ function setting_get_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 3, + 'count' => 4, 'values' => [ - '1' => [ + '37' => [ 'uniq_email_per_site' => '1', ], - '2' => [ + '38' => [ + 'uniq_email_per_site' => '1', + ], + '1' => [ 'uniq_email_per_site' => '1', ], - '3' => [ + '2' => [ 'uniq_email_per_site' => '1', ], ], diff --git a/api/v3/examples/Setting/GetFields.ex.php b/api/v3/examples/Setting/GetFields.ex.php index b74ba723dd..e48cac75aa 100644 --- a/api/v3/examples/Setting/GetFields.ex.php +++ b/api/v3/examples/Setting/GetFields.ex.php @@ -45,7 +45,7 @@ function setting_getfields_expectedresult() { $expectedResult = [ 'is_error' => 0, 'version' => 3, - 'count' => 173, + 'count' => 195, 'values' => [ 'address_standardization_provider' => [ 'group_name' => 'Address Preferences', @@ -61,7 +61,6 @@ function setting_getfields_expectedresult() { ], 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => 'CiviCRM includes an optional plugin for interfacing with the United States Postal Services (USPS) Address Standardization web service. You must register to use the USPS service at https://www.usps.com/business/web-tools-apis/address-information.htm. If you are approved, they will provide you with a User ID and the URL for the service. Plugins for other address standardization services may be available from 3rd party developers. If installed, they will be included in the drop-down below. ', ], 'address_standardization_userid' => [ @@ -75,7 +74,6 @@ function setting_getfields_expectedresult() { 'title' => 'Provider service user ID', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'address_standardization_url' => [ @@ -89,7 +87,6 @@ function setting_getfields_expectedresult() { 'title' => 'Provider Service URL', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => 'Web Service URL', 'validate_callback' => 'CRM_Utils_Rule::url', ], @@ -214,7 +211,22 @@ function setting_getfields_expectedresult() { 'title' => 'Enable deprecated Embedded Activity Revisions', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Enable tracking of activity revisions embedded within the \"civicrm_activity\" table. Alternatively, see \"Administer => System Settings => Misc => Logging\".', + 'description' => 'Enable tracking of activity revisions embedded within the \"civicrm_activity\" table. This should not be enabled on new installs and will be unsupported in the future. You should enable \"Administer => System Settings => Misc => Logging\" instead.', + 'help_text' => '', + ], + 'civicaseShowCaseActivities' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'civicaseShowCaseActivities', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '', + 'html_type' => 'radio', + 'add' => '5.24', + 'title' => 'Include case activities in general activity views.', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'e.g. the Contact form\'s Activity tab listing. Without this ticked, activities that belong to a case are hidden (default behavior). Warning: enabling this option means that all case activities relating to a contact will be listed which could result in users without \"access all cases and activities\" permission being able to see see the summarized details (date, subject, assignees, status etc.). Such users will still be prevented from managing the case and viewing/editing the activity.', 'help_text' => '', ], 'cvv_backoffice_required' => [ @@ -231,25 +243,21 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'Is the CVV code required for back office credit card transactions', 'help_text' => 'If set it back-office credit card transactions will required a cvv code. Leave as required unless you have a very strong reason to change', + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 10, + ], + ], ], 'contribution_invoice_settings' => [ 'group_name' => 'Contribute Preferences', 'group' => 'contribute', 'name' => 'contribution_invoice_settings', 'type' => 'Array', - 'default' => [ - 'invoice_prefix' => 'INV_', - 'due_date' => '10', - 'due_date_period' => 'days', - 'notes' => '', - 'tax_term' => 'Sales Tax', - 'tax_display_settings' => 'Inclusive', - ], 'add' => '4.7', - 'title' => 'Contribution Invoice Settings', + 'title' => 'Deprecated, virtualized setting', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'invoicing' => [ @@ -267,23 +275,97 @@ function setting_getfields_expectedresult() { 'on_change' => [ '0' => 'CRM_Invoicing_Utils::onToggle', ], + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 90, + ], + ], ], - 'acl_financial_type' => [ - 'group_name' => 'Contribute Preferences', - 'group' => 'contribute', - 'name' => 'acl_financial_type', - 'type' => 'Boolean', + 'invoice_prefix' => [ + 'default' => 'INV_', + 'html_type' => 'text', + 'name' => 'invoice_prefix', + 'add' => '5.23', + 'type' => 2, + 'title' => 'Invoice Prefix', + 'description' => 'Enter prefix to be be preprended when creating an invoice number', + 'is_domain' => 1, + 'is_contact' => 0, + ], + 'invoice_due_date' => [ + 'default' => '10', + 'name' => 'invoice_due_date', + 'html_type' => 'text', + 'title' => 'Due Date', + 'add' => '5.23', + 'type' => 1, + 'is_domain' => 1, + 'is_contact' => 0, + ], + 'invoice_due_date_period' => [ + 'default' => 'days', + 'html_type' => 'select', + 'name' => 'invoice_due_date_period', + 'title' => 'For transmission', + 'weight' => 4, + 'add' => '5.23', + 'type' => 2, + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Select the interval for due date.', + 'options' => [ + 'select' => '- select -', + 'days' => 'Days', + 'months' => 'Months', + 'years' => 'Years', + ], + ], + 'invoice_notes' => [ + 'default' => '', + 'name' => 'invoice_notes', + 'html_type' => 'wysiwyg', + 'title' => 'Notes or Standard Terms', + 'type' => 2, + 'add' => '5.23', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Enter note or message to be displayed on PDF invoice or credit notes ', + 'attributes' => [ + 'rows' => 2, + 'cols' => 40, + ], + ], + 'invoice_is_email_pdf' => [ + 'name' => 'invoice_is_email_pdf', 'html_type' => 'checkbox', - 'quick_form_type' => 'Element', - 'default' => 0, - 'add' => '4.7', - 'title' => 'Enable Access Control by Financial Type', + 'add' => '5.23', + 'type' => 16, 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => '', - 'help' => [ - 'id' => 'acl_financial_type', + 'title' => 'Automatically email invoice when user purchases online', + 'description' => 'Should a pdf invoice be emailed automatically?', + ], + 'tax_term' => [ + 'default' => 'Sales Tax', + 'name' => 'tax_term', + 'html_type' => 'text', + 'add' => '5.23', + 'title' => 'Tax Term', + 'type' => 2, + 'is_domain' => 1, + 'is_contact' => 0, + ], + 'tax_display_settings' => [ + 'default' => 'Inclusive', + 'html_type' => 'select', + 'name' => 'tax_display_settings', + 'type' => 2, + 'add' => '5.23', + 'title' => 'Tax Display Settings', + 'is_domain' => 1, + 'is_contact' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Core_SelectValues::taxDisplayOptions', ], ], 'deferred_revenue_enabled' => [ @@ -298,8 +380,12 @@ function setting_getfields_expectedresult() { 'title' => 'Enable Deferred Revenue', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 50, + ], + ], ], 'default_invoice_page' => [ 'group_name' => 'Contribute Preferences', @@ -309,15 +395,21 @@ function setting_getfields_expectedresult() { 'quick_form_type' => 'Select', 'default' => '', 'pseudoconstant' => [ - 'callback' => 'CRM_Contribute_PseudoConstant::contributionPage', + 'table' => 'civicrm_contribution_page', + 'keyColumn' => 'id', + 'labelColumn' => 'title', ], 'html_type' => 'select', 'add' => '4.7', 'title' => 'Default invoice payment page', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 70, + ], + ], ], 'always_post_to_accounts_receivable' => [ 'group_name' => 'Contribute Preferences', @@ -331,8 +423,12 @@ function setting_getfields_expectedresult() { 'title' => 'Always post to Accounts Receivable?', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 40, + ], + ], ], 'update_contribution_on_membership_type_change' => [ 'group_name' => 'Contribute Preferences', @@ -348,6 +444,11 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'Enabling this setting will update related contribution of membership(s) except if the membership is paid for with a recurring contribution.', 'help_text' => '', + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 20, + ], + ], ], 'contact_view_options' => [ 'group_name' => 'CiviCRM Preferences', @@ -429,7 +530,7 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => [ 'optionGroupName' => 'address_options', ], - 'default' => '123456891011', + 'default' => '12345689101112', 'add' => '4.1', 'title' => 'Address Fields', 'is_domain' => 1, @@ -484,7 +585,7 @@ function setting_getfields_expectedresult() { 'name' => 'display_name_format', 'type' => 'String', 'html_type' => 'textarea', - 'default' => '{contact.prefix_id:label}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.suffix_id:label}', + 'default' => '{contact.individual_prefix}{ }{contact.first_name}{ }{contact.last_name}{ }{contact.individual_suffix}', 'add' => '4.1', 'title' => 'Individual Display Name Format', 'is_domain' => 1, @@ -585,6 +686,28 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ], + 'defaultExternUrl' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'defaultExternUrl', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => [ + 'class' => 'crm-select2', + ], + 'default' => 'router', + 'add' => '5.27', + 'title' => 'Extern URL Style', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'This setting provides transitional support. It should be set to \"Prefer normal router.\" If your deployment requires \"Prefer standalone script\", then please ensure that the issue is tracked in lab.civicrm.org.', + 'help_text' => '', + 'options' => [ + 'standalone' => 'Prefer standalone scripts', + 'router' => 'Prefer normal router', + ], + ], 'activity_assignee_notification' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', @@ -682,9 +805,26 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => [ 'callback' => 'CRM_Contact_BAO_GroupContactCache::getModes', ], - 'description' => 'Should the smart groups be by cron jobs or user actions', + 'description' => 'Should the smart groups be flushed by cron jobs or user actions', 'help_text' => 'In \"Opportunistic Flush\" mode, caches are flushed in response to user actions; this mode is broadly compatible but may add latency during form-submissions. In \"Cron Flush\" mode, you should schedule a cron job to flush caches; this can improve latency on form-submissions but requires more setup.', ], + 'acl_cache_refresh_mode' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'acl_cache_refresh_mode', + 'type' => 'String', + 'html_type' => 'radio', + 'default' => 'opportunistic', + 'add' => '5.37.0', + 'title' => 'ACL Group Refresh Mode', + 'is_domain' => 1, + 'is_contact' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Contact_BAO_GroupContactCache::getModes', + ], + 'description' => 'Should the acl cache be flushed by cron jobs or user actions', + 'help_text' => 'In \"Opportunistic Flush\" mode, caches are flushed in response to user actions; this mode is broadly compatible but may add latency during form-submissions. In \"Cron Flush\" mode, you should schedule a cron job to flush caches if your site uses ACLs; this can improve latency on form-submissions but requires more setup.', + ], 'installed' => [ 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'CiviCRM Preferences', @@ -717,7 +857,27 @@ function setting_getfields_expectedresult() { 'title' => 'Maximum Attachments', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Maximum number of files (documents, images, etc.) which can be attached to emails or activities.', + 'description' => 'Maximum number of files (documents, images, etc.) which can be attached to emails or activities. This setting applies to UI forms and limits the number of fields available on the form.', + 'help_text' => '', + ], + 'max_attachments_backend' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'max_attachments_backend', + 'legacy_key' => 'maxAttachmentsBackend', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => [ + 'size' => 2, + 'maxlength' => 8, + ], + 'default' => 100, + 'add' => '5.20', + 'title' => 'Maximum Attachments For Backend Processes', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Maximum number of files (documents, images, etc.) which can be processed during backend processing such as automated inbound email processing. This should be a big number higher than the other Maximum Attachments setting above. This setting here merely provides an upper limit to prevent attacks that might overload the server.', 'help_text' => '', ], 'maxFileSize' => [ @@ -816,92 +976,92 @@ function setting_getfields_expectedresult() { 'callback' => 'CRM_Contact_Form_Task_PDFLetterCommon::getLoggingOptions', ], ], - 'wkhtmltopdfPath' => [ + 'dompdf_font_dir' => [ + 'is_domain' => 1, + 'is_contact' => 0, 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'wkhtmltopdfPath', + 'name' => 'dompdf_font_dir', + 'title' => 'DOMPDF Font Folder', + 'description' => 'Additional folder where DOMPDF will look for fonts.', 'type' => 'String', 'quick_form_type' => 'Element', + 'html_type' => 'text', 'html_attributes' => [ 'size' => 64, 'maxlength' => 256, ], - 'html_type' => 'text', 'default' => '', - 'add' => '4.3', - 'title' => 'Path to wkhtmltopdf executable', - 'is_domain' => 1, - 'is_contact' => 0, - 'description' => '', 'help_text' => '', + 'add' => '5.43', ], - 'recaptchaOptions' => [ + 'dompdf_chroot' => [ + 'is_domain' => 1, + 'is_contact' => 0, 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'recaptchaOptions', + 'name' => 'dompdf_chroot', + 'title' => 'DOMPDF Local Images Folder', + 'description' => 'Folder to restrict where DOMPDF looks when loading local images. By default it is the DOMPDF folder itself for security reasons. It will search in subfolders.', 'type' => 'String', 'quick_form_type' => 'Element', + 'html_type' => 'text', 'html_attributes' => [ 'size' => 64, - 'maxlength' => 64, + 'maxlength' => 256, ], - 'html_type' => 'text', 'default' => '', - 'add' => '4.3', - 'title' => 'Recaptcha Options', + 'help_text' => '', + 'add' => '5.43', + ], + 'dompdf_enable_remote' => [ 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'You can specify the reCAPTCHA theme options as comma separated data.(eg: theme:\'blackglass\', lang : \'fr\' ). Check the available options at Customizing the Look and Feel of reCAPTCHA.', + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'dompdf_enable_remote', + 'title' => 'DOMPDF Enable Remote Images', + 'description' => 'Enable the use of remote images. By default this is enabled, but if not using remote images you may wish to turn it off for security reasons.', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'html_type' => '', + 'default' => TRUE, 'help_text' => '', + 'add' => '5.43', ], - 'recaptchaPublicKey' => [ + 'dompdf_log_output_file' => [ + 'is_domain' => 1, + 'is_contact' => 0, 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'recaptchaPublicKey', + 'name' => 'dompdf_log_output_file', + 'title' => 'DOMPDF Log File', + 'description' => 'DOMPDF will log debugging output in this file.', 'type' => 'String', 'quick_form_type' => 'Element', + 'html_type' => 'text', 'html_attributes' => [ 'size' => 64, - 'maxlength' => 64, + 'maxlength' => 256, ], - 'html_type' => 'text', 'default' => '', - 'add' => '4.3', - 'title' => 'Recaptcha Site Key', - 'is_domain' => 1, - 'is_contact' => 0, - 'description' => '', 'help_text' => '', + 'add' => '5.43', ], - 'forceRecaptcha' => [ - 'add' => '4.7', - 'help_text' => '', - 'is_domain' => 1, - 'is_contact' => 0, - 'group_name' => 'CiviCRM Preferences', - 'group' => 'core', - 'name' => 'forceRecaptcha', - 'type' => 'Boolean', - 'quick_form_type' => 'YesNo', - 'html_type' => '', - 'default' => 0, - 'title' => 'Force reCAPTCHA on Contribution pages', - 'description' => 'If enabled, reCAPTCHA will show on all contribution pages.', - ], - 'recaptchaPrivateKey' => [ + 'wkhtmltopdfPath' => [ 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'recaptchaPrivateKey', + 'name' => 'wkhtmltopdfPath', 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => [ 'size' => 64, - 'maxlength' => 64, + 'maxlength' => 256, ], 'html_type' => 'text', 'default' => '', 'add' => '4.3', - 'title' => 'Recaptcha Secret Key', + 'title' => 'Path to wkhtmltopdf executable', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1483,7 +1643,7 @@ function setting_getfields_expectedresult() { 'title' => 'Enable Drupal Watchdog Logging', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Set this value to Yes if you want CiviCRM error/debugging messages to appear in the Drupal error logs', + 'description' => 'Set this value to Yes if you want CiviCRM error/debugging messages to appear in the Drupal error logs.', 'help_text' => 'Set this value to Yes if you want CiviCRM error/debugging messages the appear in your CMS\' error log. In the case of Drupal, this will cause all CiviCRM error messages to appear in the watchdog (assuming you have Drupal\'s watchdog enabled)', ], 'debug_enabled' => [ @@ -1498,7 +1658,7 @@ function setting_getfields_expectedresult() { 'title' => 'Enable Debugging', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Set this value to Yes if you want to use one of CiviCRM\'s debugging tools. This feature should NOT be enabled for production sites', + 'description' => 'Set this value to Yes if you want to use one of CiviCRM\'s debugging tools. This feature should NOT be enabled for production sites.', 'help_text' => 'Do not turn this on on production sites', ], 'backtrace' => [ @@ -1512,7 +1672,7 @@ function setting_getfields_expectedresult() { 'title' => 'Display Backtrace', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites', + 'description' => 'Set this value to Yes if you want to display a backtrace listing when a fatal error is encountered. This feature should NOT be enabled for production sites.', ], 'environment' => [ 'group_name' => 'Developer Preferences', @@ -1561,7 +1721,6 @@ function setting_getfields_expectedresult() { 'title' => 'Temporary Files Directory', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => 'File system path where temporary CiviCRM files - such as import data files - are uploaded.', ], 'imageUploadDir' => [ @@ -1644,29 +1803,6 @@ function setting_getfields_expectedresult() { 'description' => 'Path where CiviCRM extensions are stored.', 'help_text' => '', ], - 'enable_cart' => [ - 'name' => 'enable_cart', - 'group_name' => 'Event Preferences', - 'settings_pages' => [ - 'event' => [ - 'weight' => 10, - ], - ], - 'group' => 'event', - 'type' => 'Boolean', - 'quick_form_type' => 'CheckBox', - 'default' => 0, - 'add' => '4.1', - 'title' => 'Use Shopping Cart Style Event Registration', - 'is_domain' => 1, - 'is_contact' => 0, - 'description' => 'This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a \"cart\" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it', - 'help_text' => '', - 'documentation_link' => [ - 'page' => 'CiviEvent Cart Checkout', - 'resource' => 'wiki', - ], - ], 'show_events' => [ 'name' => 'show_events', 'group_name' => 'Event Preferences', @@ -1706,7 +1842,6 @@ function setting_getfields_expectedresult() { 'title' => 'Extension Repo URL', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'customTranslateFunction' => [ @@ -1726,7 +1861,6 @@ function setting_getfields_expectedresult() { ], 'default' => '', 'title' => 'Custom Translate Function', - 'description' => '', ], 'monetaryThousandSeparator' => [ 'group_name' => 'Localization Preferences', @@ -1743,7 +1877,6 @@ function setting_getfields_expectedresult() { 'title' => 'Thousands Separator', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'monetaryDecimalPoint' => [ @@ -1761,7 +1894,6 @@ function setting_getfields_expectedresult() { 'title' => 'Decimal Delimiter', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'moneyformat' => [ @@ -1776,7 +1908,20 @@ function setting_getfields_expectedresult() { 'title' => 'Monetary Amount Display', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'help_text' => '', + ], + 'moneyvalueformat' => [ + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'moneyvalueformat', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'default' => '%!i', + 'add' => '4.3', + 'title' => 'Monetary Value Display', + 'is_domain' => 1, + 'is_contact' => 0, 'help_text' => '', ], 'defaultCurrency' => [ @@ -1833,6 +1978,9 @@ function setting_getfields_expectedresult() { 'type' => 'Integer', 'quick_form_type' => 'ChainSelect', 'html_type' => 'ChainSelect', + 'chain_select_settings' => [ + 'control_field' => 'defaultContactCountry', + ], 'default' => '', 'title' => 'Default State/Province', 'description' => 'This value is selected by default when adding a new contact address.', @@ -1854,7 +2002,6 @@ function setting_getfields_expectedresult() { 'title' => 'Available Countries', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', 'pseudoconstant' => [ 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries', @@ -1877,7 +2024,6 @@ function setting_getfields_expectedresult() { 'title' => 'Available States and Provinces (by Country)', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', 'pseudoconstant' => [ 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries', @@ -1894,8 +2040,8 @@ function setting_getfields_expectedresult() { 'title' => 'Inherit CMS Language', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', + 'description' => 'If Yes, the initial session language will be set by the CMS, which can later be changed if using the CiviCRM language switcher.', ], 'dateformatDatetime' => [ 'group_name' => 'Localization Preferences', @@ -1909,7 +2055,6 @@ function setting_getfields_expectedresult() { 'title' => 'Date Format: Complete Date and Time', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'dateformatFull' => [ @@ -1924,7 +2069,6 @@ function setting_getfields_expectedresult() { 'title' => 'Date Format: Complete Date', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'dateformatPartial' => [ @@ -1939,7 +2083,6 @@ function setting_getfields_expectedresult() { 'title' => 'Date Format: Month and Year', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'dateformatTime' => [ @@ -1959,7 +2102,6 @@ function setting_getfields_expectedresult() { ], 'default' => '%l:%M %P', 'title' => 'Date Format: Time Only', - 'description' => '', ], 'dateformatYear' => [ 'add' => '4.7', @@ -1978,7 +2120,6 @@ function setting_getfields_expectedresult() { ], 'default' => '%Y', 'title' => 'Date Format: Year Only', - 'description' => '', ], 'dateformatFinancialBatch' => [ 'add' => '4.7', @@ -1997,7 +2138,6 @@ function setting_getfields_expectedresult() { ], 'default' => '%m/%d/%Y', 'title' => 'Date Format: Financial Batch', - 'description' => '', ], 'dateformatshortdate' => [ 'add' => '4.7', @@ -2016,7 +2156,6 @@ function setting_getfields_expectedresult() { ], 'default' => '%m/%d/%Y', 'title' => 'Date Format: Short date Month Day Year', - 'description' => '', ], 'dateInputFormat' => [ 'add' => '4.7', @@ -2034,7 +2173,6 @@ function setting_getfields_expectedresult() { ], 'default' => 'mm/dd/yy', 'title' => 'Date Input Format', - 'description' => '', ], 'fieldSeparator' => [ 'add' => '4.7', @@ -2071,7 +2209,6 @@ function setting_getfields_expectedresult() { 'd' => 1, ], 'title' => 'Fiscal Year Start', - 'description' => '', ], 'languageLimit' => [ 'group_name' => 'Localization Preferences', @@ -2089,7 +2226,6 @@ function setting_getfields_expectedresult() { 'title' => 'Available Languages (Multi-lingual)', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', 'pseudoconstant' => [ 'callback' => 'CRM_Core_I18n::languages', @@ -2111,7 +2247,6 @@ function setting_getfields_expectedresult() { 'title' => 'Available Languages', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => 'User Interface languages available to users', 'pseudoconstant' => [ 'callback' => 'CRM_Core_I18n::languages', @@ -2132,7 +2267,6 @@ function setting_getfields_expectedresult() { 'title' => 'Default Language', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', 'pseudoconstant' => [ 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions', @@ -2176,7 +2310,6 @@ function setting_getfields_expectedresult() { ], 'default' => '1', 'title' => 'Time Input Format', - 'description' => '', 'on_change' => [ '0' => 'CRM_Core_BAO_PreferencesDate::onChangeSetting', ], @@ -2196,7 +2329,6 @@ function setting_getfields_expectedresult() { 'title' => 'Week begins on', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'contact_default_language' => [ @@ -2217,9 +2349,32 @@ function setting_getfields_expectedresult() { 'title' => 'Default Language for contacts', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Default language (if any) for contact records', + 'description' => 'Default language (if any) for contact records.', 'help_text' => 'If a contact is created with no language this setting will determine the language data (if any) to save.You may or may not wish to make an assumption here about whether it matches the site language', ], + 'pinnedContactCountries' => [ + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'pinnedContactCountries', + 'type' => 'Array', + 'quick_form_type' => 'Element', + 'html_type' => 'advmultiselect', + 'html_attributes' => [ + 'size' => 5, + 'style' => 'width:150px', + 'class' => 'advmultiselect', + ], + 'default' => [], + 'add' => '5.33', + 'title' => 'Pinned Countries', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Appear in Top section of select list', + 'help_text' => 'Selected countries will appear in top section of country list', + 'pseudoconstant' => [ + 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries', + ], + ], 'profile_double_optin' => [ 'group_name' => 'Mailing Preferences', 'group' => 'mailing', @@ -2245,7 +2400,7 @@ function setting_getfields_expectedresult() { 'title' => 'Track replies using VERP in Reply-To header', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If checked, mailings will default to tracking replies using VERP-ed Reply-To. ', + 'description' => 'If checked, mailings will default to tracking replies using VERP-ed Reply-To.', 'help_text' => '', 'validate_callback' => 'CRM_Core_BAO_Setting::validateBoolSetting', ], @@ -2274,7 +2429,6 @@ function setting_getfields_expectedresult() { 'title' => 'Enable global server wide lock for CiviMail', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'replyTo' => [ @@ -2288,7 +2442,7 @@ function setting_getfields_expectedresult() { 'title' => 'Enable Custom Reply-To', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Allow CiviMail users to send mailings with a custom Reply-To header', + 'description' => 'Allow CiviMail users to send mailings with a custom Reply-To header.', 'help_text' => '', ], 'mailing_backend' => [ @@ -2304,7 +2458,6 @@ function setting_getfields_expectedresult() { 'title' => 'Mailing Backend', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'profile_add_to_group_double_optin' => [ @@ -2360,7 +2513,7 @@ function setting_getfields_expectedresult() { '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', + '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' => '', ], 'civimail_multiple_bulk_emails' => [ @@ -2388,7 +2541,6 @@ function setting_getfields_expectedresult() { 'title' => 'Enable CiviMail to generate Message-ID header', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'mailerBatchLimit' => [ @@ -2445,7 +2597,7 @@ function setting_getfields_expectedresult() { 'title' => 'Mailer Cron Job Limit', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'The maximum number of mailer delivery jobs executing simultaneously (0 = allow as many processes to execute as started by cron)', + 'description' => 'The maximum number of mailer delivery jobs executing simultaneously (0 = allow as many processes to execute as started by cron).', 'help_text' => '', ], 'mailThrottleTime' => [ @@ -2498,7 +2650,6 @@ function setting_getfields_expectedresult() { 'title' => 'Enable CiviMail to create activities on delivery', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'simple_mail_limit' => [ @@ -2516,7 +2667,7 @@ function setting_getfields_expectedresult() { 'title' => 'Simple mail limit', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'The number of emails sendable via simple mail. Make sure you understand the implications for your spam reputation and legal requirements for bulk emails before editing. As there is some risk both to your spam reputation and the products if this is misused it is a hidden setting', + 'description' => 'The number of emails sendable via simple mail. Make sure you understand the implications for your spam reputation and legal requirements for bulk emails before editing. As there is some risk both to your spam reputation and the products if this is misused it is a hidden setting.', 'help_text' => 'CiviCRM forces users sending more than this number of mails to use CiviMails. CiviMails have additional precautions: not sending to contacts who do not want bulk mail, adding domain name and opt out links. You should familiarise yourself with the law relevant to you on bulk mailings if changing this setting. For the US https://en.wikipedia.org/wiki/CAN-SPAM_Act_of_2003 is a good place to start.', ], 'auto_recipient_rebuild' => [ @@ -2543,9 +2694,56 @@ function setting_getfields_expectedresult() { 'title' => 'Allow mail from logged in contact', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Allow sending email from the logged in contact\'s email address', + 'description' => 'Allow sending email from the logged in contact\'s email address.', 'help_text' => 'CiviCRM allows you to send email from the domain from email addresses and the logged in contact id addresses by default. Disable this if you only want to allow the domain from addresses to be used.', ], + 'url_tracking_default' => [ + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'url_tracking_default', + 'type' => 'Boolean', + 'html_type' => 'checkbox', + 'quick_form_type' => 'CheckBox', + 'default' => '1', + 'title' => 'Enable click-through tracking by default', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If checked, mailings will have click-through tracking enabled by default.', + 'help_text' => '', + ], + 'open_tracking_default' => [ + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'open_tracking_default', + 'type' => 'Boolean', + 'html_type' => 'checkbox', + 'quick_form_type' => 'CheckBox', + 'default' => '1', + 'title' => 'Enable open tracking by default', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If checked, mailings will have open tracking enabled by default.', + 'help_text' => '', + ], + 'civimail_sync_interval' => [ + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'civimail_sync_interval', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => [ + 'size' => 4, + 'maxlength' => 8, + ], + 'default' => 10, + 'title' => 'Database Update Frequency', + 'add' => '5.28', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'The frequency that CiviMail updates its sent mail database.', + 'help_text' => '', + ], 'geoAPIKey' => [ 'add' => '4.7', 'help_text' => '', @@ -2563,7 +2761,7 @@ function setting_getfields_expectedresult() { ], 'default' => '', 'title' => 'Geo Provider Key', - 'description' => 'Enter the API key or Application ID associated with your geocoding provider (not required for Yahoo).', + 'description' => 'Enter the API key or Application ID associated with your geocoding provider.', ], 'geoProvider' => [ 'add' => '4.7', @@ -2701,7 +2899,6 @@ function setting_getfields_expectedresult() { 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'uniq_email_per_site' => [ @@ -2714,7 +2911,6 @@ function setting_getfields_expectedresult() { 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'search_autocomplete_count' => [ @@ -2768,7 +2964,6 @@ function setting_getfields_expectedresult() { 'title' => 'How to handle full-text queries', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', 'help_text' => '', ], 'includeOrderByClause' => [ @@ -2782,7 +2977,7 @@ function setting_getfields_expectedresult() { 'title' => 'Include Order By Clause', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If disabled, the search results will not be ordered. This may improve response time on search results on large datasets', + 'description' => 'If disabled, the search results will not be ordered. This may improve response time on search results on large datasets.', 'help_text' => '', ], 'includeWildCardInName' => [ @@ -2941,6 +3136,25 @@ function setting_getfields_expectedresult() { 'description' => 'Which fields can be searched on in the menubar quicksearch box? Don\'t see your custom field here? Make sure it is marked as Searchable.', 'help_text' => '', ], + 'default_pager_size' => [ + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'default_pager_size', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => [ + 'size' => 2, + 'maxlength' => 3, + ], + 'default' => 50, + 'add' => '5.39', + 'title' => 'Default Search Pager size', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'What is the default number of records to show on a search', + 'help_text' => '', + ], 'userFrameworkResourceURL' => [ 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group' => 'url', @@ -3009,6 +3223,191 @@ function setting_getfields_expectedresult() { 'help_text' => '', 'validate_callback' => 'CRM_Utils_Rule::urlish', ], + 'enable_cart' => [ + 'name' => 'enable_cart', + 'group_name' => 'Event Preferences', + 'settings_pages' => [ + 'event' => [ + 'weight' => 10, + ], + ], + 'group' => 'event', + 'type' => 'Boolean', + 'quick_form_type' => 'CheckBox', + 'default' => 0, + 'add' => '4.1', + 'title' => 'Use Shopping Cart Style Event Registration', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'This feature allows users to register for more than one event at a time. When enabled, users will add event(s) to a \"cart\" and then pay for them all at once. Enabling this setting will affect online registration for all active events. The code is an alpha state, and you will potentially need to have developer resources to debug and fix sections of the codebase while testing and deploying it', + 'help_text' => '', + 'documentation_link' => [ + 'page' => 'CiviEvent Cart Checkout', + 'resource' => 'wiki', + ], + ], + 'acl_financial_type' => [ + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'acl_financial_type', + 'type' => 'Boolean', + 'html_type' => 'checkbox', + 'quick_form_type' => 'Element', + 'default' => 0, + 'add' => '4.7', + 'title' => 'Enable Access Control by Financial Type', + 'is_domain' => 1, + 'is_contact' => 0, + 'help_text' => '', + 'help' => [ + 'id' => 'acl_financial_type', + ], + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 30, + ], + ], + 'on_change' => [ + '0' => 'financialacls_toggle', + ], + ], + 'flexmailer_traditional' => [ + 'group_name' => 'Flexmailer Preferences', + 'group' => 'flexmailer', + 'name' => 'flexmailer_traditional', + 'type' => 'String', + 'html_type' => 'select', + 'html_attributes' => [ + 'class' => 'crm-select2', + ], + 'pseudoconstant' => [ + 'callback' => '_flexmailer_traditional_options', + ], + 'default' => 'auto', + 'add' => '5.13', + 'title' => 'Traditional Mailing Handler', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'For greater backward-compatibility, process \"traditional\" mailings with the CiviMail\'s hard-coded BAO.
For greater forward-compatibility, process \"traditional\" mailings with Flexmailer\'s extensible pipeline.', + 'help_text' => '', + 'settings_pages' => [ + 'flexmailer' => [ + 'weight' => 5, + ], + ], + ], + 'recaptchaPublicKey' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'recaptchaPublicKey', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_attributes' => [ + 'size' => 64, + 'maxlength' => 64, + ], + 'html_type' => 'text', + 'default' => '', + 'add' => '4.3', + 'title' => 'reCAPTCHA Site Key', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + 'settings_pages' => [ + 'recaptcha' => [ + 'weight' => 10, + ], + ], + ], + 'recaptchaPrivateKey' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'recaptchaPrivateKey', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_attributes' => [ + 'size' => 64, + 'maxlength' => 64, + ], + 'html_type' => 'text', + 'default' => '', + 'add' => '4.3', + 'title' => 'reCAPTCHA Secret Key', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + 'settings_pages' => [ + 'recaptcha' => [ + 'weight' => 10, + ], + ], + ], + 'forceRecaptcha' => [ + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'forceRecaptcha', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'html_type' => '', + 'default' => 0, + 'title' => 'Force reCAPTCHA on Contribution pages', + 'description' => 'If enabled, reCAPTCHA will show on all contribution pages.', + 'settings_pages' => [ + 'recaptcha' => [ + 'weight' => 10, + ], + ], + ], + 'recaptchaOptions' => [ + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'recaptchaOptions', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_attributes' => [ + 'size' => 64, + 'maxlength' => 64, + ], + 'html_type' => 'text', + 'default' => '', + 'add' => '4.3', + 'title' => 'reCAPTCHA Options', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'You can specify the reCAPTCHA theme options as comma separated data.(eg: theme:\'blackglass\', lang : \'fr\' ). Check the available options at Customizing the Look and Feel of reCAPTCHA.', + 'help_text' => '', + 'settings_pages' => [ + 'recaptcha' => [ + 'weight' => 10, + ], + ], + ], + 'credit_notes_prefix' => [ + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'credit_notes_prefix', + 'html_type' => 'text', + 'quick_form_type' => 'Element', + 'add' => '5.23', + 'type' => 2, + 'title' => 'Credit Notes Prefix', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Prefix to be prepended to credit note ids', + 'default' => 'CN_', + 'help_text' => 'The credit note ID is generated when a contribution is set to Refunded, Cancelled or Chargeback. It is visible on invoices, if invoices are enabled', + 'settings_pages' => [ + 'contribute' => [ + 'weight' => 80, + ], + ], + ], ], ]; diff --git a/api/v3/examples/Setting/GetSpecifiedDomains.ex.php b/api/v3/examples/Setting/GetSpecifiedDomains.ex.php index 5013a7a61b..5bcd7b2990 100644 --- a/api/v3/examples/Setting/GetSpecifiedDomains.ex.php +++ b/api/v3/examples/Setting/GetSpecifiedDomains.ex.php @@ -16,7 +16,7 @@ function setting_get_example() { $params = [ 'domain_id' => [ '0' => 1, - '1' => 2, + '1' => 37, ], 'return' => [ '0' => 'uniq_email_per_site', @@ -58,7 +58,7 @@ function setting_get_expectedresult() { '1' => [ 'uniq_email_per_site' => 0, ], - '2' => [ + '37' => [ 'uniq_email_per_site' => '1', ], ], diff --git a/api/v3/examples/StateProvince/Create.ex.php b/api/v3/examples/StateProvince/Create.ex.php index 138cf073f7..8cf583aa33 100644 --- a/api/v3/examples/StateProvince/Create.ex.php +++ b/api/v3/examples/StateProvince/Create.ex.php @@ -48,13 +48,14 @@ function state_province_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 14033, + 'id' => 14064, 'values' => [ - '14033' => [ - 'id' => '14033', + '14064' => [ + 'id' => '14064', 'name' => 'Wessex', 'abbreviation' => 'WEX', 'country_id' => '1226', + 'is_active' => '', ], ], ]; diff --git a/api/v3/examples/StateProvince/Delete.ex.php b/api/v3/examples/StateProvince/Delete.ex.php index 399b374b2f..14e280b8f5 100644 --- a/api/v3/examples/StateProvince/Delete.ex.php +++ b/api/v3/examples/StateProvince/Delete.ex.php @@ -12,7 +12,7 @@ */ function state_province_delete_example() { $params = [ - 'id' => 14034, + 'id' => 14066, ]; try { diff --git a/api/v3/examples/StateProvince/Get.ex.php b/api/v3/examples/StateProvince/Get.ex.php index db65af930d..057206f1a8 100644 --- a/api/v3/examples/StateProvince/Get.ex.php +++ b/api/v3/examples/StateProvince/Get.ex.php @@ -46,13 +46,14 @@ function state_province_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 14035, + 'id' => 14068, 'values' => [ - '14035' => [ - 'id' => '14035', + '14068' => [ + 'id' => '14068', 'name' => 'Wessex', 'abbreviation' => 'WEX', 'country_id' => '1226', + 'is_active' => '1', ], ], ]; diff --git a/api/v3/examples/StatusPreference/Create.ex.php b/api/v3/examples/StatusPreference/Create.ex.php index 418e9bd846..509536b270 100644 --- a/api/v3/examples/StatusPreference/Create.ex.php +++ b/api/v3/examples/StatusPreference/Create.ex.php @@ -50,16 +50,17 @@ function status_preference_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 4, + 'id' => 7, 'values' => [ - '4' => [ - 'id' => '4', + '7' => [ + 'id' => '7', 'domain_id' => '1', 'name' => 'test_check', 'hush_until' => '20151212000000', 'ignore_severity' => '5', 'prefs' => '', 'check_info' => '', + 'is_active' => '', ], ], ]; diff --git a/api/v3/examples/StatusPreference/Delete.ex.php b/api/v3/examples/StatusPreference/Delete.ex.php index 3407426e8d..418e7514f9 100644 --- a/api/v3/examples/StatusPreference/Delete.ex.php +++ b/api/v3/examples/StatusPreference/Delete.ex.php @@ -12,7 +12,7 @@ */ function status_preference_delete_example() { $params = [ - 'id' => 2, + 'id' => 3, ]; try { diff --git a/api/v3/examples/StatusPreference/Get.ex.php b/api/v3/examples/StatusPreference/Get.ex.php index 4b42a89656..0feb43099e 100644 --- a/api/v3/examples/StatusPreference/Get.ex.php +++ b/api/v3/examples/StatusPreference/Get.ex.php @@ -12,7 +12,7 @@ */ function status_preference_get_example() { $params = [ - 'id' => 3, + 'id' => 5, ]; try { @@ -46,14 +46,15 @@ function status_preference_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 3, + 'id' => 5, 'values' => [ - '3' => [ - 'id' => '3', + '5' => [ + 'id' => '5', 'domain_id' => '1', 'name' => 'test_check', 'hush_until' => '2015-12-12', 'ignore_severity' => '4', + 'is_active' => '1', ], ], ]; diff --git a/api/v3/examples/Tag/Create.ex.php b/api/v3/examples/Tag/Create.ex.php index 3357866e45..e3bbbb9f10 100644 --- a/api/v3/examples/Tag/Create.ex.php +++ b/api/v3/examples/Tag/Create.ex.php @@ -54,9 +54,9 @@ function tag_create_expectedresult() { 'name' => 'Super Heros', 'description' => 'Outside undie-wearers', 'parent_id' => '', - 'is_selectable' => '1', - 'is_reserved' => 0, - 'is_tagset' => 0, + 'is_selectable' => '', + 'is_reserved' => '', + 'is_tagset' => '', 'used_for' => 'civicrm_contact', 'created_id' => '', 'color' => '', diff --git a/api/v3/examples/Tag/GetFields.ex.php b/api/v3/examples/Tag/GetFields.ex.php index fb280ca8b8..789b79c899 100644 --- a/api/v3/examples/Tag/GetFields.ex.php +++ b/api/v3/examples/Tag/GetFields.ex.php @@ -60,6 +60,13 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '1.1', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'tag', @@ -78,6 +85,7 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '1.1', 'is_core_field' => TRUE, 'api.required' => 1, ], @@ -93,20 +101,31 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '1.1', 'is_core_field' => TRUE, ], 'parent_id' => [ 'name' => 'parent_id', 'type' => 1, - 'title' => 'Parent Tag', + 'title' => 'Parent Tag ID', 'description' => 'Optional parent id for this tag.', 'where' => 'civicrm_tag.parent_id', - 'default' => 'NULL', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, 'FKClassName' => 'CRM_Core_DAO_Tag', + 'html' => [ + 'label' => 'Parent Tag', + 'size' => 6, + 'maxlength' => 14, + ], + 'pseudoconstant' => [ + 'table' => 'civicrm_tag', + 'keyColumn' => 'id', + 'labelColumn' => 'name', + ], + 'add' => '1.1', 'is_core_field' => TRUE, 'FKApiName' => 'Tag', ], @@ -121,6 +140,7 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '2.1', 'is_core_field' => TRUE, ], 'is_reserved' => [ @@ -132,6 +152,7 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '3.2', 'is_core_field' => TRUE, ], 'is_tagset' => [ @@ -143,6 +164,7 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '3.2', 'is_core_field' => TRUE, ], 'used_for' => [ @@ -152,7 +174,6 @@ function tag_getfields_expectedresult() { 'maxlength' => 64, 'size' => 30, 'where' => 'civicrm_tag.used_for', - 'default' => 'NULL', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', @@ -167,13 +188,14 @@ function tag_getfields_expectedresult() { 'optionGroupName' => 'tag_used_for', 'optionEditPath' => 'civicrm/admin/options/tag_used_for', ], + 'add' => '3.2', 'is_core_field' => TRUE, 'api.default' => 'civicrm_contact', ], 'created_id' => [ 'name' => 'created_id', 'type' => 1, - 'title' => 'Tag Created By', + 'title' => 'Created By Contact ID', 'description' => 'FK to civicrm_contact, who created this tag', 'where' => 'civicrm_tag.created_id', 'table_name' => 'civicrm_tag', @@ -181,6 +203,12 @@ function tag_getfields_expectedresult() { 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'html' => [ + 'label' => 'Created By', + 'size' => 6, + 'maxlength' => 14, + ], + 'add' => '3.4', 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], @@ -192,11 +220,11 @@ function tag_getfields_expectedresult() { 'maxlength' => 255, 'size' => 45, 'where' => 'civicrm_tag.color', - 'default' => 'NULL', 'table_name' => 'civicrm_tag', 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '4.7', 'is_core_field' => TRUE, ], 'created_date' => [ @@ -209,6 +237,7 @@ function tag_getfields_expectedresult() { 'entity' => 'Tag', 'bao' => 'CRM_Core_BAO_Tag', 'localizable' => 0, + 'add' => '3.4', 'is_core_field' => TRUE, ], ], diff --git a/api/v3/examples/Website/Delete.ex.php b/api/v3/examples/Website/Delete.ex.php index 478c1a3334..2b04101b8a 100644 --- a/api/v3/examples/Website/Delete.ex.php +++ b/api/v3/examples/Website/Delete.ex.php @@ -12,7 +12,7 @@ */ function website_delete_example() { $params = [ - 'id' => 3, + 'id' => 5, ]; try { diff --git a/api/v3/examples/Website/Get.ex.php b/api/v3/examples/Website/Get.ex.php index 66451f7ad1..8492e1faef 100644 --- a/api/v3/examples/Website/Get.ex.php +++ b/api/v3/examples/Website/Get.ex.php @@ -48,10 +48,10 @@ function website_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 2, + 'id' => 3, 'values' => [ - '2' => [ - 'id' => '2', + '3' => [ + 'id' => '3', 'contact_id' => '5', 'url' => 'website.com', 'website_type_id' => '1', diff --git a/api/v3/examples/Website/GetFields.ex.php b/api/v3/examples/Website/GetFields.ex.php index b44b4f8ed9..6801f5543a 100644 --- a/api/v3/examples/Website/GetFields.ex.php +++ b/api/v3/examples/Website/GetFields.ex.php @@ -58,6 +58,13 @@ function website_getfields_expectedresult() { 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + 'size' => 6, + 'maxlength' => 14, + ], + 'readonly' => TRUE, + 'add' => '3.2', 'is_core_field' => TRUE, 'api.aliases' => [ '0' => 'website_id', @@ -66,7 +73,7 @@ function website_getfields_expectedresult() { 'contact_id' => [ 'name' => 'contact_id', 'type' => 1, - 'title' => 'Contact', + 'title' => 'Contact ID', 'description' => 'FK to Contact ID', 'where' => 'civicrm_website.contact_id', 'table_name' => 'civicrm_website', @@ -74,6 +81,12 @@ function website_getfields_expectedresult() { 'bao' => 'CRM_Core_BAO_Website', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'html' => [ + 'label' => 'Contact', + 'size' => 6, + 'maxlength' => 14, + ], + 'add' => '3.2', 'is_core_field' => TRUE, 'FKApiName' => 'Contact', ], @@ -98,6 +111,7 @@ function website_getfields_expectedresult() { 'maxlength' => 128, 'size' => 30, ], + 'add' => '3.2', 'is_core_field' => TRUE, ], 'website_type_id' => [ @@ -119,6 +133,7 @@ function website_getfields_expectedresult() { 'optionGroupName' => 'website_type', 'optionEditPath' => 'civicrm/admin/options/website_type', ], + 'add' => '3.2', 'is_core_field' => TRUE, ], ], diff --git a/api/v3/examples/Website/GetWithMetadata.ex.php b/api/v3/examples/Website/GetWithMetadata.ex.php index 05e817d03d..d3cd32d16d 100644 --- a/api/v3/examples/Website/GetWithMetadata.ex.php +++ b/api/v3/examples/Website/GetWithMetadata.ex.php @@ -66,6 +66,13 @@ function website_get_expectedresult() { 'entity' => 'Website', 'bao' => 'CRM_Core_BAO_Website', 'localizable' => 0, + 'html' => [ + 'type' => 'Number', + 'size' => '6', + 'maxlength' => '14', + ], + 'readonly' => '1', + 'add' => '3.2', 'is_core_field' => '1', 'api.aliases' => [ '0' => 'website_id', @@ -74,7 +81,7 @@ function website_get_expectedresult() { 'contact_id' => [ 'name' => 'contact_id', 'type' => '1', - 'title' => 'Contact', + 'title' => 'Contact ID', 'description' => 'FK to Contact ID', 'where' => 'civicrm_website.contact_id', 'table_name' => 'civicrm_website', @@ -82,6 +89,12 @@ function website_get_expectedresult() { 'bao' => 'CRM_Core_BAO_Website', 'localizable' => 0, 'FKClassName' => 'CRM_Contact_DAO_Contact', + 'html' => [ + 'label' => 'Contact', + 'size' => '6', + 'maxlength' => '14', + ], + 'add' => '3.2', 'is_core_field' => '1', 'FKApiName' => 'Contact', ], @@ -106,6 +119,7 @@ function website_get_expectedresult() { 'maxlength' => '128', 'size' => '30', ], + 'add' => '3.2', 'is_core_field' => '1', ], 'website_type_id' => [ @@ -127,6 +141,7 @@ function website_get_expectedresult() { 'optionGroupName' => 'website_type', 'optionEditPath' => 'civicrm/admin/options/website_type', ], + 'add' => '3.2', 'is_core_field' => '1', ], ], diff --git a/tests/templates/documentFunction.tpl b/tests/templates/documentFunction.tpl index 199226399f..1ec1bc5a0d 100644 --- a/tests/templates/documentFunction.tpl +++ b/tests/templates/documentFunction.tpl @@ -1,4 +1,9 @@ {literal} Development > API Explorer. -* -* Read more about testing here -* https://docs.civicrm.org/dev/en/latest/testing/ -* -* API Standards documentation: -* https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ -*/ + * This example has been generated from the API test suite. + * The test that created it is called "{$testFunction}" + * and can be found at: + * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/{$testFile} + * + * You can see the outcome of the API tests at + * https://test.civicrm.org/job/CiviCRM-Core-Matrix/ + * + * To Learn about the API read + * https://docs.civicrm.org/dev/en/latest/api/ + * + * Browse the API on your own site with the API Explorer. It is in the main + * CiviCRM menu, under: Support > Development > API Explorer. + * + * Read more about testing here + * https://docs.civicrm.org/dev/en/latest/testing/ + * + * API Standards documentation: + * https://docs.civicrm.org/dev/en/latest/framework/api-architecture/ + */ -- 2.25.1