From 1d8ee3d65d4378d6e61eb9eb82cd3b33d70c502e Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 7 Feb 2017 13:55:46 +1300 Subject: [PATCH] Update Test generated examples m --- .../Activity/ContactRefCustomField.php | 4 +- .../Activity/ContactRefCustomFieldGet.php | 9 +- api/v3/examples/Activity/Create.php | 6 +- api/v3/examples/Activity/DateTimeHigh.php | 2 +- api/v3/examples/Activity/DateTimeLow.php | 2 +- api/v3/examples/Activity/Get.php | 4 +- api/v3/examples/Activity/GetFields.php | 76 + .../Activity/GetTargetandAssigneeName.php | 14 +- .../Activity/ReturnAssigneeContact.php | 2 +- api/v3/examples/ActivityType/Create.php | 10 +- api/v3/examples/ActivityType/Get.php | 2 +- api/v3/examples/Constant/Get.php | 2 +- api/v3/examples/Contact/APIChainedArray.php | 26 +- .../Contact/APIChainedArrayFormats.php | 14 +- .../Contact/APIChainedArrayMultipleCustom.php | 50 +- ...IChainedArrayValuesFromSiblingFunction.php | 6 +- api/v3/examples/Contact/ChainTwoWebsites.php | 12 +- .../Contact/ChainTwoWebsitesSyntax2.php | 12 +- api/v3/examples/Contact/Create.php | 6 +- .../Contact/CreateParticipantPayment.php | 7 +- api/v3/examples/Contact/CustomFieldGet.php | 10 +- .../CustomFieldGetReturnSyntaxVariation.php | 10 +- api/v3/examples/Contact/Delete.php | 2 +- api/v3/examples/Contact/Get.php | 12 +- api/v3/examples/Contact/GetFieldsOptions.php | 162 +- .../Contact/GroupFilterUsingContactAPI.php | 12 +- .../ContributionCreateWithHonoreeContact.php | 10 +- .../ContributionCreateWithNote.php | 8 +- .../ContributionCreateWithSoftCredit.php | 10 +- ...ntributionCreateWithSoftCreditDefaults.php | 10 +- api/v3/examples/Contribution/Create.php | 14 +- .../CreateWithNestedLineItems.php | 84 +- api/v3/examples/Contribution/Delete.php | 5 +- api/v3/examples/Contribution/Get.php | 15 +- api/v3/examples/ContributionPage/Create.php | 11 +- api/v3/examples/ContributionPage/Get.php | 10 +- api/v3/examples/ContributionPage/Submit.php | 19 +- api/v3/examples/ContributionRecur/Delete.php | 2 +- api/v3/examples/Country/Create.php | 6 +- api/v3/examples/Country/Delete.php | 2 +- api/v3/examples/Country/Get.php | 6 +- api/v3/examples/EntityTag/Delete.php | 4 +- api/v3/examples/EntityTag/Get.php | 11 +- api/v3/examples/Event/IsFullOption.php | 2 +- api/v3/examples/Group/GetFields.php | 60 + api/v3/examples/Job/Create.php | 5 +- api/v3/examples/Job/Delete.php | 2 +- api/v3/examples/Logging/Get.php | 50 +- api/v3/examples/Logging/Revert.php | 2 +- api/v3/examples/Mailing/Create.php | 30 +- api/v3/examples/Mailing/Delete.php | 2 +- api/v3/examples/Mailing/Submit.php | 23 +- api/v3/examples/MailingAB/Create.php | 8 +- api/v3/examples/Membership/Create.php | 12 +- .../Membership/CreateWithCustomData.php | 12 +- .../examples/Membership/FilterIsCurrent.php | 8 +- api/v3/examples/Membership/Get.php | 10 +- .../examples/Membership/UpdateCustomData.php | 12 +- api/v3/examples/MembershipType/Create.php | 4 +- api/v3/examples/MembershipType/Get.php | 3 +- api/v3/examples/MessageTemplate/Create.php | 26 +- api/v3/examples/MessageTemplate/Delete.php | 2 +- api/v3/examples/MessageTemplate/Get.php | 28 +- api/v3/examples/OptionGroup/Create.php | 7 +- api/v3/examples/OptionGroup/Delete.php | 2 +- api/v3/examples/Order/Cancel.php | 2 +- api/v3/examples/Order/Create.php | 6 +- .../examples/Order/CreateOrderParticipant.php | 6 +- api/v3/examples/Order/Get.php | 9 +- api/v3/examples/Participant/Create.php | 8 +- api/v3/examples/Participant/Get.php | 4 +- api/v3/examples/Participant/NestedDelete.php | 10 +- .../examples/Participant/NestedEventGet.php | 8 +- .../examples/ParticipantStatusType/Create.php | 6 +- .../examples/ParticipantStatusType/Delete.php | 2 +- api/v3/examples/ParticipantStatusType/Get.php | 6 +- api/v3/examples/Payment/Cancel.php | 5 +- api/v3/examples/Payment/Create.php | 5 +- .../Payment/CreatePaymentWithLineItems.php | 5 +- api/v3/examples/Payment/Delete.php | 3 +- api/v3/examples/Payment/Get.php | 3 +- api/v3/examples/Payment/UpdatePayment.php | 5 +- api/v3/examples/PaymentProcessor/Create.php | 4 +- api/v3/examples/PaymentProcessor/Delete.php | 5 +- .../examples/PaymentProcessorType/Create.php | 8 +- .../examples/PaymentProcessorType/Delete.php | 5 +- api/v3/examples/PaymentToken/Create.php | 93 + api/v3/examples/PaymentToken/Delete.php | 70 + api/v3/examples/PaymentToken/Get.php | 83 + api/v3/examples/Pcp/Create.php | 93 + api/v3/examples/Phone/Create.php | 3 +- api/v3/examples/Phone/Delete.php | 5 +- api/v3/examples/Phone/Get.php | 3 +- api/v3/examples/Pledge/Create.php | 9 +- api/v3/examples/Pledge/Delete.php | 3 +- api/v3/examples/Pledge/Get.php | 8 +- api/v3/examples/Pledge/GetFilterHighDate.php | 10 +- api/v3/examples/PledgePayment/Create.php | 3 +- api/v3/examples/PledgePayment/Delete.php | 3 +- api/v3/examples/PledgePayment/Get.php | 3 +- api/v3/examples/PledgePayment/Update.php | 3 +- api/v3/examples/PriceField/Create.php | 3 +- api/v3/examples/PriceField/Delete.php | 3 +- api/v3/examples/PriceField/Get.php | 3 +- api/v3/examples/PriceFieldValue/Create.php | 7 +- api/v3/examples/PriceFieldValue/Delete.php | 5 +- api/v3/examples/PriceFieldValue/Get.php | 6 +- api/v3/examples/PriceSet/Create.php | 4 +- api/v3/examples/PriceSet/Delete.php | 3 +- api/v3/examples/PriceSet/Get.php | 4 +- api/v3/examples/Profile/Apply.php | 3 +- api/v3/examples/Profile/Get.php | 3 +- api/v3/examples/Profile/GetFields.php | 68 +- api/v3/examples/Profile/Submit.php | 3 +- .../Relationship/BetweenRelationshipType.php | 28 +- api/v3/examples/Relationship/Create.php | 3 +- api/v3/examples/Relationship/Delete.php | 3 +- api/v3/examples/Relationship/Get.php | 4 +- .../Relationship/INRelationshipType.php | 21 +- .../NotBetweenRelationshipType.php | 14 +- .../Relationship/NotInRelationshipType.php | 21 +- .../examples/Relationship/filterIsCurrent.php | 10 +- api/v3/examples/RelationshipType/Create.php | 3 +- api/v3/examples/RelationshipType/Delete.php | 5 +- api/v3/examples/ReportTemplate/Getrows.php | 17 +- .../examples/ReportTemplate/Getstatistics.php | 17 +- api/v3/examples/SavedSearch/Create.php | 127 ++ api/v3/examples/SavedSearch/Delete.php | 70 + api/v3/examples/SavedSearch/Get.php | 79 + api/v3/examples/Setting/Create.php | 3 +- api/v3/examples/Setting/CreateAllDomains.php | 3 +- .../Setting/CreateSettingCurrentDomain.php | 3 +- .../Setting/CreateSpecifiedDomains.php | 3 +- api/v3/examples/Setting/Get.php | 3 +- api/v3/examples/Setting/GetAllDomains.php | 3 +- api/v3/examples/Setting/GetDefaults.php | 3 +- api/v3/examples/Setting/GetFields.php | 1546 ++++++++++++++--- .../Setting/GetSettingCurrentDomain.php | 3 +- .../examples/Setting/GetSpecifiedDomains.php | 3 +- api/v3/examples/Setting/GetValue.php | 3 +- api/v3/examples/Setting/Revert.php | 3 +- api/v3/examples/StateProvince/Create.php | 80 + api/v3/examples/StateProvince/Delete.php | 70 + api/v3/examples/StateProvince/Get.php | 78 + api/v3/examples/StatusPreference/Create.php | 85 + api/v3/examples/StatusPreference/Delete.php | 70 + api/v3/examples/StatusPreference/Get.php | 79 + api/v3/examples/Survey/ChainedGetDelete.php | 5 +- api/v3/examples/Survey/Create.php | 3 +- api/v3/examples/Survey/Delete.php | 5 +- api/v3/examples/Survey/Get.php | 3 +- api/v3/examples/SurveyRespondant/Get.php | 3 +- api/v3/examples/System/Flush.php | 3 +- api/v3/examples/Tag/Create.php | 4 +- api/v3/examples/Tag/Delete.php | 5 +- api/v3/examples/Tag/Get.php | 3 +- api/v3/examples/Tag/GetFields.php | 57 +- api/v3/examples/Tag/GetList.php | 3 +- api/v3/examples/Tag/GetReturnArray.php | 3 +- api/v3/examples/UFField/Create.php | 3 +- api/v3/examples/UFField/Delete.php | 3 +- api/v3/examples/UFField/Get.php | 3 +- api/v3/examples/UFField/Replace.php | 3 +- api/v3/examples/UFGroup/Create.php | 5 +- api/v3/examples/UFGroup/Delete.php | 5 +- api/v3/examples/UFGroup/Get.php | 5 +- api/v3/examples/UFJoin/Create.php | 13 +- api/v3/examples/UFJoin/Get.php | 3 +- api/v3/examples/UFMatch/Get.php | 3 +- api/v3/examples/Website/Create.php | 3 +- api/v3/examples/Website/Delete.php | 3 +- api/v3/examples/Website/Get.php | 3 +- api/v3/examples/Website/GetFields.php | 24 +- api/v3/examples/Website/GetWithMetadata.php | 24 +- 174 files changed, 3475 insertions(+), 821 deletions(-) create mode 100644 api/v3/examples/PaymentToken/Create.php create mode 100644 api/v3/examples/PaymentToken/Delete.php create mode 100644 api/v3/examples/PaymentToken/Get.php create mode 100644 api/v3/examples/Pcp/Create.php create mode 100644 api/v3/examples/SavedSearch/Create.php create mode 100644 api/v3/examples/SavedSearch/Delete.php create mode 100644 api/v3/examples/SavedSearch/Get.php create mode 100644 api/v3/examples/StateProvince/Create.php create mode 100644 api/v3/examples/StateProvince/Delete.php create mode 100644 api/v3/examples/StateProvince/Get.php create mode 100644 api/v3/examples/StatusPreference/Create.php create mode 100644 api/v3/examples/StatusPreference/Delete.php create mode 100644 api/v3/examples/StatusPreference/Get.php diff --git a/api/v3/examples/Activity/ContactRefCustomField.php b/api/v3/examples/Activity/ContactRefCustomField.php index adf4230f13..b830541308 100644 --- a/api/v3/examples/Activity/ContactRefCustomField.php +++ b/api/v3/examples/Activity/ContactRefCustomField.php @@ -10,7 +10,7 @@ function activity_create_example() { $params = array( 'source_contact_id' => 1, - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'status_id' => 2, @@ -57,7 +57,7 @@ function activity_create_expectedresult() { '1' => array( 'id' => '1', 'source_record_id' => '', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'activity_date_time' => '20110602143613', 'duration' => '120', diff --git a/api/v3/examples/Activity/ContactRefCustomFieldGet.php b/api/v3/examples/Activity/ContactRefCustomFieldGet.php index 6cd8188ccb..8603caf946 100644 --- a/api/v3/examples/Activity/ContactRefCustomFieldGet.php +++ b/api/v3/examples/Activity/ContactRefCustomFieldGet.php @@ -48,7 +48,7 @@ function activity_get_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'duration' => '120', @@ -60,13 +60,14 @@ function activity_get_expectedresult() { 'is_auto' => 0, 'is_current_revision' => '1', 'is_deleted' => 0, - 'source_contact_id' => '1', + 'is_star' => 0, 'custom_1' => 'defaultValue', - 'custom_1_1' => 'defaultValue', + 'custom_2_id' => '1', 'custom_2' => 'Anderson, Anthony', + 'source_contact_id' => '1', + 'custom_1_1' => 'defaultValue', 'custom_2_1' => 'Anderson, Anthony', 'custom_2_1_id' => '1', - 'custom_2_id' => '1', ), ), ); diff --git a/api/v3/examples/Activity/Create.php b/api/v3/examples/Activity/Create.php index 6615362918..a380f128d0 100644 --- a/api/v3/examples/Activity/Create.php +++ b/api/v3/examples/Activity/Create.php @@ -8,7 +8,7 @@ function activity_create_example() { $params = array( 'source_contact_id' => 1, - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'status_id' => 2, @@ -55,7 +55,7 @@ function activity_create_expectedresult() { '1' => array( 'id' => '1', 'source_record_id' => '', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'activity_date_time' => '20110602143613', 'duration' => '120', @@ -87,7 +87,7 @@ function activity_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testActivityCreateCustom" +* The test that created it is called "testActivityCreateCustomSubType" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ActivityTest.php * diff --git a/api/v3/examples/Activity/DateTimeHigh.php b/api/v3/examples/Activity/DateTimeHigh.php index 4833a1885b..54d9ace232 100644 --- a/api/v3/examples/Activity/DateTimeHigh.php +++ b/api/v3/examples/Activity/DateTimeHigh.php @@ -49,7 +49,7 @@ function activity_get_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'Make-it-Happen Meeting', 'activity_date_time' => '2011-01-01 00:00:00', 'duration' => '120', diff --git a/api/v3/examples/Activity/DateTimeLow.php b/api/v3/examples/Activity/DateTimeLow.php index f7052bc2aa..e670e377e2 100644 --- a/api/v3/examples/Activity/DateTimeLow.php +++ b/api/v3/examples/Activity/DateTimeLow.php @@ -48,7 +48,7 @@ function activity_get_expectedresult() { 'values' => array( '0' => array( 'id' => '2', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'Make-it-Happen Meeting', 'activity_date_time' => '2012-02-16 00:00:00', 'duration' => '120', diff --git a/api/v3/examples/Activity/Get.php b/api/v3/examples/Activity/Get.php index ac52fab260..1d98195589 100644 --- a/api/v3/examples/Activity/Get.php +++ b/api/v3/examples/Activity/Get.php @@ -8,7 +8,7 @@ function activity_get_example() { $params = array( 'contact_id' => 1, - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'sequential' => 1, 'return.custom_1' => 1, ); @@ -49,7 +49,7 @@ function activity_get_expectedresult() { '0' => array( 'source_contact_id' => '1', 'id' => '1', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'location' => 'Pennsylvania', 'activity_date_time' => '2011-06-02 14:36:13', diff --git a/api/v3/examples/Activity/GetFields.php b/api/v3/examples/Activity/GetFields.php index a6269d125a..76bca1d500 100644 --- a/api/v3/examples/Activity/GetFields.php +++ b/api/v3/examples/Activity/GetFields.php @@ -47,6 +47,9 @@ function activity_getfields_expectedresult() { '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.', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', ), 'activity_type_id' => array( 'name' => 'activity_type_id', @@ -59,6 +62,9 @@ function activity_getfields_expectedresult() { 'headerPattern' => '/(activity.)?type(.id$)/i', 'export' => TRUE, 'default' => '1', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -78,8 +84,12 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.activity_date_time', 'headerPattern' => '/(activity.)?date(.time$)?/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select Date', + 'format' => 'activityDateTime', ), ), 'phone_id' => array( @@ -87,6 +97,9 @@ function activity_getfields_expectedresult() { 'type' => 1, 'title' => 'Phone (called) ID', 'description' => 'Phone ID of the number called (optional - used if an existing phone number is selected).', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'FKClassName' => 'CRM_Core_DAO_Phone', 'html' => array( 'type' => 'EntityRef', @@ -102,6 +115,9 @@ function activity_getfields_expectedresult() { 'description' => 'Phone number in case the number does not exist in the civicrm_phone table.', 'maxlength' => 64, 'size' => 30, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', 'maxlength' => 64, @@ -113,6 +129,9 @@ function activity_getfields_expectedresult() { 'type' => 1, 'title' => 'Priority', 'description' => 'ID of the priority given to this activity. Foreign key to civicrm_option_value.', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -128,6 +147,9 @@ function activity_getfields_expectedresult() { 'type' => 1, 'title' => 'Parent Activity Id', 'description' => 'Parent meeting ID (if this is a follow-up item). This is not currently implemented', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'FKClassName' => 'CRM_Activity_DAO_Activity', 'FKApiName' => 'Activity', ), @@ -135,6 +157,9 @@ function activity_getfields_expectedresult() { 'name' => 'is_auto', 'type' => 16, 'title' => 'Auto', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', ), 'relationship_id' => array( 'name' => 'relationship_id', @@ -142,6 +167,9 @@ function activity_getfields_expectedresult() { 'title' => 'Relationship Id', 'description' => 'FK to Relationship ID', 'default' => 'NULL', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'FKClassName' => 'CRM_Contact_DAO_Relationship', 'FKApiName' => 'Relationship', ), @@ -154,6 +182,9 @@ function activity_getfields_expectedresult() { 'headerPattern' => '/(is.)?(current.)?(revision|version(ing)?)/i', 'export' => TRUE, 'default' => '1', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'CheckBox', ), @@ -163,6 +194,9 @@ function activity_getfields_expectedresult() { 'type' => 1, 'title' => 'Original Activity ID ', 'description' => 'Activity ID of the first activity record in versioning chain.', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'FKClassName' => 'CRM_Activity_DAO_Activity', 'FKApiName' => 'Activity', ), @@ -170,6 +204,9 @@ function activity_getfields_expectedresult() { 'name' => 'weight', 'type' => 1, 'title' => 'Order', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', 'size' => 6, @@ -185,6 +222,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.is_star', 'headerPattern' => '/(activity.)?(star|favorite)/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', ), 'id' => array( 'name' => 'id', @@ -195,6 +235,9 @@ function activity_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_activity.id', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'uniqueName' => 'activity_id', 'api.aliases' => array( '0' => 'activity_id', @@ -211,6 +254,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.subject', 'headerPattern' => '/(activity.)?subject/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -227,6 +273,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.duration', 'headerPattern' => '/(activity.)?duration(s)?$/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', 'size' => 6, @@ -245,6 +294,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.location', 'headerPattern' => '/(activity.)?location$/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -261,6 +313,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.details', 'headerPattern' => '/(activity.)?detail(s)?$/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'RichTextEditor', 'rows' => 2, @@ -276,6 +331,9 @@ function activity_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_activity.status_id', 'headerPattern' => '/(activity.)?status(.label$)?/i', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -298,6 +356,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.is_test', 'headerPattern' => '/(is.)?test(.activity)?/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select', ), @@ -309,6 +370,9 @@ function activity_getfields_expectedresult() { 'title' => 'Activity Medium', 'description' => 'Activity Medium, Implicit FK to civicrm_option_value where option_group = encounter_medium.', 'default' => 'NULL', + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -327,6 +391,9 @@ function activity_getfields_expectedresult() { 'description' => 'Currently being used to store result id for survey activity, FK to option value.', 'maxlength' => 255, 'size' => 45, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -342,6 +409,9 @@ function activity_getfields_expectedresult() { 'where' => 'civicrm_activity.is_deleted', 'headerPattern' => '/(activity.)?(trash|deleted)/i', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Text', ), @@ -355,6 +425,9 @@ function activity_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_activity.campaign_id', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'FKClassName' => 'CRM_Campaign_DAO_Campaign', 'html' => array( 'type' => 'CheckBox', @@ -377,6 +450,9 @@ function activity_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_activity.engagement_level', 'export' => TRUE, + 'table_name' => 'civicrm_activity', + 'entity' => 'Activity', + 'bao' => 'CRM_Activity_BAO_Activity', 'html' => array( 'type' => 'Select', 'size' => 6, diff --git a/api/v3/examples/Activity/GetTargetandAssigneeName.php b/api/v3/examples/Activity/GetTargetandAssigneeName.php index 77b45f7bbb..003b333d37 100644 --- a/api/v3/examples/Activity/GetTargetandAssigneeName.php +++ b/api/v3/examples/Activity/GetTargetandAssigneeName.php @@ -48,16 +48,18 @@ function activity_getsingle_expectedresult() { $expectedResult = array( 'id' => '1', 'subject' => 'Make-it-Happen Meeting', - 'source_contact_id' => '8', + 'source_contact_id' => '6', 'source_contact_name' => 'D Bug', - 'target_contact_id' => array('5', '6'), + 'target_contact_id' => array( + '1' => '4', + ), 'target_contact_name' => array( - '5' => 'A Cat', - '6' => 'B Good', + '3' => 'A Cat', + '4' => 'B Good', ), - 'assignee_contact_id' => array('7'), + 'assignee_contact_id' => array(), 'assignee_contact_name' => array( - '7' => 'C Shore', + '5' => 'C Shore', ), ); diff --git a/api/v3/examples/Activity/ReturnAssigneeContact.php b/api/v3/examples/Activity/ReturnAssigneeContact.php index 574a34a7b2..4042c39fff 100644 --- a/api/v3/examples/Activity/ReturnAssigneeContact.php +++ b/api/v3/examples/Activity/ReturnAssigneeContact.php @@ -52,7 +52,7 @@ function activity_get_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'activity_type_id' => '51', + 'activity_type_id' => '55', 'subject' => 'test activity type id', 'activity_date_time' => '2011-06-02 14:36:13', 'duration' => '120', diff --git a/api/v3/examples/ActivityType/Create.php b/api/v3/examples/ActivityType/Create.php index ac5da5ced8..b3a231503b 100644 --- a/api/v3/examples/ActivityType/Create.php +++ b/api/v3/examples/ActivityType/Create.php @@ -49,13 +49,13 @@ function activity_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 784, + 'id' => 849, 'values' => array( - '784' => array( - 'id' => '784', + '849' => array( + 'id' => '849', 'option_group_id' => '2', 'label' => 'send out letters', - 'value' => '51', + 'value' => '55', 'name' => 'send out letters', 'grouping' => '', 'filter' => 0, @@ -68,6 +68,8 @@ function activity_type_create_expectedresult() { 'component_id' => '', 'domain_id' => '', 'visibility_id' => '', + 'icon' => '', + 'color' => '', ), ), 'deprecated' => 'The ActivityType api is deprecated. Please use the OptionValue api instead.', diff --git a/api/v3/examples/ActivityType/Get.php b/api/v3/examples/ActivityType/Get.php index a2158500c1..3befa05035 100644 --- a/api/v3/examples/ActivityType/Get.php +++ b/api/v3/examples/ActivityType/Get.php @@ -41,7 +41,7 @@ function activity_type_get_expectedresult() { $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 50, + 'count' => 54, 'values' => array( '1' => 'Meeting', '2' => 'Phone Call', diff --git a/api/v3/examples/Constant/Get.php b/api/v3/examples/Constant/Get.php index a6c11087a0..561e259a1e 100644 --- a/api/v3/examples/Constant/Get.php +++ b/api/v3/examples/Constant/Get.php @@ -43,7 +43,7 @@ function constant_get_expectedresult() { $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 32, + 'count' => 36, 'values' => array( '1' => 'Meeting', '2' => 'Phone Call', diff --git a/api/v3/examples/Contact/APIChainedArray.php b/api/v3/examples/Contact/APIChainedArray.php index 839b99005e..35f3a002d4 100644 --- a/api/v3/examples/Contact/APIChainedArray.php +++ b/api/v3/examples/Contact/APIChainedArray.php @@ -10,7 +10,7 @@ */ function contact_get_example() { $params = array( - 'id' => 1, + 'id' => 3, 'api.website.get' => array(), 'api.Contribution.get' => array( 'total_amount' => '120.00', @@ -50,10 +50,10 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'xyz3, abc3', @@ -89,8 +89,8 @@ function contact_get_expectedresult() { 'sic_code' => '', 'contact_is_deleted' => 0, 'current_employer' => '', - 'address_id' => '2', - 'street_address' => '1 my road', + 'address_id' => '', + 'street_address' => '', 'supplemental_address_1' => '', 'supplemental_address_2' => '', 'city' => '', @@ -118,7 +118,7 @@ function contact_get_expectedresult() { 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '1', + 'id' => '3', 'api.website.get' => array( 'is_error' => 0, 'version' => 3, @@ -127,7 +127,7 @@ function contact_get_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'contact_id' => '1', + 'contact_id' => '3', 'url' => 'http://civicrm.org', ), ), @@ -139,7 +139,7 @@ function contact_get_expectedresult() { 'id' => 2, 'values' => array( '0' => array( - 'contact_id' => '1', + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'xyz3, abc3', @@ -159,10 +159,11 @@ function contact_get_expectedresult() { 'thankyou_date' => '', 'contribution_source' => 'SSF', 'amount_level' => '', + 'contribution_recur_id' => '', 'is_test' => 0, 'is_pay_later' => 0, 'contribution_status_id' => '1', - 'check_number' => '', + 'contribution_check_number' => '', 'contribution_campaign_id' => '', 'financial_type_id' => '1', 'financial_type' => 'Donation', @@ -174,16 +175,17 @@ function contact_get_expectedresult() { 'fulfilled_date' => '', 'contribution_start_date' => '', 'contribution_end_date' => '', - 'contribution_recur_id' => '', 'financial_account_id' => '1', 'accounting_code' => '4200', + 'campaign_id' => '', + 'contribution_campaign_title' => '', 'contribution_note' => '', 'contribution_batch' => '', 'contribution_status' => 'Completed', 'payment_instrument' => 'Credit Card', 'payment_instrument_id' => '1', 'instrument_id' => '1', - 'contribution_check_number' => '', + 'check_number' => '', 'id' => '2', 'contribution_type_id' => '1', ), diff --git a/api/v3/examples/Contact/APIChainedArrayFormats.php b/api/v3/examples/Contact/APIChainedArrayFormats.php index c79c27a426..5145682730 100644 --- a/api/v3/examples/Contact/APIChainedArrayFormats.php +++ b/api/v3/examples/Contact/APIChainedArrayFormats.php @@ -10,7 +10,7 @@ */ function contact_get_example() { $params = array( - 'id' => 1, + 'id' => 3, 'api.website.getValue' => array( 'return' => 'url', ), @@ -51,10 +51,10 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'xyz3, abc3', @@ -90,8 +90,8 @@ function contact_get_expectedresult() { 'sic_code' => '', 'contact_is_deleted' => 0, 'current_employer' => '', - 'address_id' => '2', - 'street_address' => '1 my road', + 'address_id' => '', + 'street_address' => '', 'supplemental_address_1' => '', 'supplemental_address_2' => '', 'city' => '', @@ -119,7 +119,7 @@ function contact_get_expectedresult() { 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '1', + 'id' => '3', 'api.website.getValue' => 'http://civicrm.org', 'api.Contribution.getCount' => 2, 'api.CustomValue.get' => array( diff --git a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php index c484a896c6..d9d6b8f49e 100644 --- a/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php +++ b/api/v3/examples/Contact/APIChainedArrayMultipleCustom.php @@ -9,7 +9,7 @@ */ function contact_get_example() { $params = array( - 'id' => 1, + 'id' => 3, 'api.website.getValue' => array( 'return' => 'url', ), @@ -48,10 +48,10 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'xyz3, abc3', @@ -87,8 +87,8 @@ function contact_get_expectedresult() { 'sic_code' => '', 'contact_is_deleted' => 0, 'current_employer' => '', - 'address_id' => '2', - 'street_address' => '1 my road', + 'address_id' => '', + 'street_address' => '', 'supplemental_address_1' => '', 'supplemental_address_2' => '', 'city' => '', @@ -116,59 +116,61 @@ function contact_get_expectedresult() { 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '1', + 'id' => '3', 'api.website.getValue' => 'http://civicrm.org', 'api.Contribution.getCount' => 2, 'api.CustomValue.get' => array( 'is_error' => 0, 'version' => 3, - 'count' => 8, + 'count' => 7, 'values' => array( '0' => array( - 'entity_id' => '1', + 'entity_id' => '3', + 'entity_table' => 'Contact', 'latest' => 'value 4', 'id' => '1', - 'entity_table' => 'Contact', ), '1' => array( + 'entity_id' => '3', 'entity_table' => 'Contact', - ), - '2' => array( - 'entity_id' => '1', 'latest' => 'value 3', 'id' => '2', '1' => 'value 2', - 'entity_table' => 'Contact', '2' => 'value 3', ), - '3' => array( - 'entity_id' => '1', + '2' => array( + 'entity_id' => '3', + 'entity_table' => 'Contact', 'latest' => '', 'id' => '3', '1' => 'warm beer', '2' => '', ), - '4' => array( - 'entity_id' => '1', + '3' => array( + 'entity_id' => '3', + 'entity_table' => 'Contact', 'latest' => '', 'id' => '4', '1' => '', '2' => '', ), - '5' => array( - 'entity_id' => '1', + '4' => array( + 'entity_id' => '3', + 'entity_table' => 'Contact', 'latest' => 'defaultValue', 'id' => '5', '1' => 'defaultValue', ), - '6' => array( - 'entity_id' => '1', + '5' => array( + 'entity_id' => '3', + 'entity_table' => 'Contact', 'latest' => 'vegemite', 'id' => '6', '1' => 'vegemite', ), - '7' => array( - 'entity_id' => '1', + '6' => array( + 'entity_id' => '3', + 'entity_table' => 'Contact', 'latest' => '', 'id' => '7', '1' => '', diff --git a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php index a1b3a68db3..6bca265586 100644 --- a/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php +++ b/api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php @@ -53,10 +53,10 @@ function contact_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'id' => '1', + '3' => array( + 'id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'do_not_email' => 0, diff --git a/api/v3/examples/Contact/ChainTwoWebsites.php b/api/v3/examples/Contact/ChainTwoWebsites.php index 8d2a4d3ff5..0c1f887ed4 100644 --- a/api/v3/examples/Contact/ChainTwoWebsites.php +++ b/api/v3/examples/Contact/ChainTwoWebsites.php @@ -65,10 +65,10 @@ function contact_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'id' => '1', + '3' => array( + 'id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'do_not_email' => 0, @@ -125,7 +125,7 @@ function contact_create_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'contact_id' => '1', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -165,7 +165,7 @@ function contact_create_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'contact_id' => '1', + 'contact_id' => '3', 'url' => 'http://civicrm.org', 'website_type_id' => '', ), @@ -179,7 +179,7 @@ function contact_create_expectedresult() { 'values' => array( '0' => array( 'id' => '2', - 'contact_id' => '1', + 'contact_id' => '3', 'url' => 'http://chained.org', 'website_type_id' => '', ), diff --git a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php index 99e6a75588..f6ae673091 100644 --- a/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php +++ b/api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php @@ -68,10 +68,10 @@ function contact_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'id' => '1', + '3' => array( + 'id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'do_not_email' => 0, @@ -128,7 +128,7 @@ function contact_create_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'contact_id' => '1', + 'contact_id' => '3', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -169,7 +169,7 @@ function contact_create_expectedresult() { 'values' => array( '0' => array( 'id' => '1', - 'contact_id' => '1', + 'contact_id' => '3', 'url' => 'http://civicrm.org', 'website_type_id' => '', ), @@ -183,7 +183,7 @@ function contact_create_expectedresult() { 'values' => array( '0' => array( 'id' => '2', - 'contact_id' => '1', + 'contact_id' => '3', 'url' => 'http://chained.org', 'website_type_id' => '2', ), diff --git a/api/v3/examples/Contact/Create.php b/api/v3/examples/Contact/Create.php index 9e0392a4dc..107c95ded3 100644 --- a/api/v3/examples/Contact/Create.php +++ b/api/v3/examples/Contact/Create.php @@ -46,10 +46,10 @@ function contact_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'id' => '1', + '3' => array( + 'id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'do_not_email' => 0, diff --git a/api/v3/examples/Contact/CreateParticipantPayment.php b/api/v3/examples/Contact/CreateParticipantPayment.php index 80021fa595..7a66c4277b 100644 --- a/api/v3/examples/Contact/CreateParticipantPayment.php +++ b/api/v3/examples/Contact/CreateParticipantPayment.php @@ -13,7 +13,7 @@ function contact_create_example() { 'contact_type' => 'Individual', 'display_name' => 'dlobo', 'api.participant' => array( - 'event_id' => 40, + 'event_id' => 42, 'status_id' => 1, 'role_id' => 1, 'format.only_id' => 1, @@ -38,7 +38,8 @@ function contact_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -73,7 +74,7 @@ function contact_create_expectedresult() { 'is_opt_out' => 0, 'legal_identifier' => '', 'external_identifier' => '', - 'sort_name' => '', + 'sort_name' => 'dlobo', 'display_name' => 'dlobo', 'nick_name' => '', 'legal_name' => '', diff --git a/api/v3/examples/Contact/CustomFieldGet.php b/api/v3/examples/Contact/CustomFieldGet.php index ac3e7b3ab6..07e8ae1e6e 100644 --- a/api/v3/examples/Contact/CustomFieldGet.php +++ b/api/v3/examples/Contact/CustomFieldGet.php @@ -10,7 +10,7 @@ function contact_get_example() { $params = array( 'return.custom_1' => 1, - 'id' => 1, + 'id' => 3, ); try{ @@ -44,13 +44,13 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'civicrm_value_testgetwithcu_1_id' => '1', 'custom_1' => 'custom string', - 'id' => '1', + 'id' => '3', ), ), ); diff --git a/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php b/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php index d5ac755842..c1e47702bf 100644 --- a/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php +++ b/api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php @@ -10,7 +10,7 @@ function contact_get_example() { $params = array( 'return' => 'custom_1', - 'id' => 1, + 'id' => 3, ); try{ @@ -44,13 +44,13 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'civicrm_value_testgetwithcu_1_id' => '1', 'custom_1' => 'custom string', - 'id' => '1', + 'id' => '3', ), ), ); diff --git a/api/v3/examples/Contact/Delete.php b/api/v3/examples/Contact/Delete.php index bfb4f9976e..1bb7f83feb 100644 --- a/api/v3/examples/Contact/Delete.php +++ b/api/v3/examples/Contact/Delete.php @@ -7,7 +7,7 @@ */ function contact_delete_example() { $params = array( - 'id' => 1, + 'id' => 3, ); try{ diff --git a/api/v3/examples/Contact/Get.php b/api/v3/examples/Contact/Get.php index fb2556c9f4..9f666711fc 100644 --- a/api/v3/examples/Contact/Get.php +++ b/api/v3/examples/Contact/Get.php @@ -41,10 +41,10 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'man2@yahoo.com', @@ -80,8 +80,8 @@ function contact_get_expectedresult() { 'sic_code' => '', 'contact_is_deleted' => 0, 'current_employer' => '', - 'address_id' => '2', - 'street_address' => '1 my road', + 'address_id' => '', + 'street_address' => '', 'supplemental_address_1' => '', 'supplemental_address_2' => '', 'city' => '', @@ -109,7 +109,7 @@ function contact_get_expectedresult() { 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '1', + 'id' => '3', ), ), ); diff --git a/api/v3/examples/Contact/GetFieldsOptions.php b/api/v3/examples/Contact/GetFieldsOptions.php index a366b40958..57972c5252 100644 --- a/api/v3/examples/Contact/GetFieldsOptions.php +++ b/api/v3/examples/Contact/GetFieldsOptions.php @@ -57,6 +57,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.id', 'headerPattern' => '/internal|contact?|id$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'api.aliases' => array( '0' => 'contact_id', ), @@ -70,6 +73,9 @@ function contact_getfields_expectedresult() { 'size' => 30, 'export' => TRUE, 'where' => 'civicrm_contact.contact_type', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'maxlength' => 64, @@ -94,6 +100,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.contact_sub_type', 'headerPattern' => '/C(ontact )?(subtype|sub-type|sub type)/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'maxlength' => 255, @@ -115,6 +124,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/d(o )?(not )?(email)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -128,6 +140,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/d(o )?(not )?(call|phone)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -141,6 +156,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^(d(o\\s)?n(ot\\s)?mail)|(\\w*)?bulk\\s?(\\w*)$/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -154,6 +172,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/d(o )?(not )?(sms)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -167,6 +188,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/d(o )?(not )?(trade)/i', 'dataPattern' => '/^\\d{1,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -180,6 +204,9 @@ function contact_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_contact.is_opt_out', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -197,6 +224,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/legal\\s?id/i', 'dataPattern' => '/\\w+?\\d{5,}/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 32, @@ -215,6 +245,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/external\\s?id/i', 'dataPattern' => '/^\\d{11,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 64, @@ -230,6 +263,9 @@ function contact_getfields_expectedresult() { 'size' => 30, 'export' => TRUE, 'where' => 'civicrm_contact.sort_name', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -245,6 +281,9 @@ function contact_getfields_expectedresult() { 'size' => 30, 'export' => TRUE, 'where' => 'civicrm_contact.display_name', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -263,6 +302,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/n(ick\\s)name|nick$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -280,6 +322,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.legal_name', 'headerPattern' => '/^legal|(l(egal\\s)?name)$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -294,6 +339,9 @@ function contact_getfields_expectedresult() { 'import' => TRUE, 'where' => 'civicrm_contact.image_URL', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'File', 'rows' => 2, @@ -312,6 +360,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^p(ref\\w*\\s)?c(omm\\w*)|( meth\\w*)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'maxlength' => 255, @@ -333,6 +384,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.preferred_language', 'headerPattern' => '/^lang/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'maxlength' => 5, @@ -356,6 +410,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^p(ref\\w*\\s)?m(ail\\s)?f(orm\\w*)$/i', 'export' => TRUE, 'default' => 'Both', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'maxlength' => 8, @@ -374,6 +431,9 @@ function contact_getfields_expectedresult() { 'size' => 20, 'export' => TRUE, 'where' => 'civicrm_contact.hash', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', ), 'api_key' => array( 'name' => 'api_key', @@ -382,6 +442,9 @@ function contact_getfields_expectedresult() { 'description' => 'API Key for validating requests related to this contact.', 'maxlength' => 32, 'size' => 20, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', ), 'first_name' => array( 'name' => 'first_name', @@ -395,6 +458,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^first|(f(irst\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 64, @@ -413,6 +479,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^middle|(m(iddle\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 64, @@ -431,6 +500,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^last|(l(ast\\s)?name)$/i', 'dataPattern' => '/^\\w+(\\s\\w+)?+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 64, @@ -447,6 +519,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^(prefix|title)/i', 'dataPattern' => '/^(mr|ms|mrs|sir|dr)\\.?$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -471,6 +546,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^suffix$/i', 'dataPattern' => '/^(sr|jr)\\.?|i{2,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -496,6 +574,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.formal_title', 'headerPattern' => '/^title/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 64, @@ -509,6 +590,9 @@ function contact_getfields_expectedresult() { 'description' => 'Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.', 'export' => TRUE, 'where' => 'civicrm_contact.communication_style_id', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -524,6 +608,9 @@ function contact_getfields_expectedresult() { 'type' => 1, 'title' => 'Email Greeting ID', 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Email Greeting.', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', ), 'email_greeting_custom' => array( 'name' => 'email_greeting_custom', @@ -534,6 +621,9 @@ function contact_getfields_expectedresult() { 'size' => 45, 'import' => TRUE, 'where' => 'civicrm_contact.email_greeting_custom', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -547,6 +637,9 @@ function contact_getfields_expectedresult() { 'description' => 'Cache Email Greeting.', 'maxlength' => 255, 'size' => 45, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -558,6 +651,9 @@ function contact_getfields_expectedresult() { 'type' => 1, 'title' => 'Postal Greeting ID', 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'size' => 6, @@ -573,6 +669,9 @@ function contact_getfields_expectedresult() { 'size' => 45, 'import' => TRUE, 'where' => 'civicrm_contact.postal_greeting_custom', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -586,6 +685,9 @@ function contact_getfields_expectedresult() { 'description' => 'Cache Postal greeting.', 'maxlength' => 255, 'size' => 45, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -597,6 +699,9 @@ function contact_getfields_expectedresult() { 'type' => 1, 'title' => 'Addressee ID', 'description' => 'FK to civicrm_option_value.id, that has to be valid registered Addressee.', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', ), 'addressee_custom' => array( 'name' => 'addressee_custom', @@ -607,6 +712,9 @@ function contact_getfields_expectedresult() { 'size' => 45, 'import' => TRUE, 'where' => 'civicrm_contact.addressee_custom', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -620,6 +728,9 @@ function contact_getfields_expectedresult() { 'description' => 'Cache Addressee.', 'maxlength' => 255, 'size' => 45, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -638,6 +749,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^job|(j(ob\\s)?title)$/i', 'dataPattern' => '//', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -653,6 +767,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.gender_id', 'headerPattern' => '/^gender$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select', 'size' => 6, @@ -676,8 +793,12 @@ 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, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select Date', + 'format' => 'birth', ), ), 'is_deceased' => array( @@ -688,6 +809,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.is_deceased', 'headerPattern' => '/i(s\\s)?d(eceased)$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -701,8 +825,12 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.deceased_date', 'headerPattern' => '/^deceased|(d(eceased\\s)?date)$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Select Date', + 'format' => 'birth', ), ), 'household_name' => array( @@ -717,6 +845,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^household|(h(ousehold\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -728,6 +859,9 @@ function contact_getfields_expectedresult() { 'type' => 1, 'title' => 'Household Primary Contact ID', 'description' => 'Optional FK to Primary Contact for this household.', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'html' => array( 'type' => 'Select', @@ -748,6 +882,9 @@ function contact_getfields_expectedresult() { 'headerPattern' => '/^organization|(o(rganization\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 128, @@ -765,6 +902,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.sic_code', 'headerPattern' => '/^sic|(s(ic\\s)?code)$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 8, @@ -784,6 +924,9 @@ function contact_getfields_expectedresult() { 'dataPattern' => '/^[\\w\\/\\:\\.]+$/', 'export' => TRUE, 'rule' => 'url', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -799,6 +942,9 @@ function contact_getfields_expectedresult() { 'export' => TRUE, 'where' => 'civicrm_contact.created_date', 'default' => 'NULL', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', ), 'modified_date' => array( 'name' => 'modified_date', @@ -809,6 +955,9 @@ function contact_getfields_expectedresult() { 'export' => TRUE, 'where' => 'civicrm_contact.modified_date', 'default' => 'CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', ), 'source' => array( 'name' => 'source', @@ -821,6 +970,9 @@ function contact_getfields_expectedresult() { 'where' => 'civicrm_contact.source', 'headerPattern' => '/(C(ontact\\s)?Source)$/i', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', 'maxlength' => 255, @@ -835,6 +987,9 @@ function contact_getfields_expectedresult() { 'description' => 'OPTIONAL FK to civicrm_contact record.', 'export' => TRUE, 'where' => 'civicrm_contact.employer_id', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'html' => array( 'type' => 'EntityRef', @@ -851,6 +1006,9 @@ function contact_getfields_expectedresult() { 'required' => TRUE, 'export' => TRUE, 'where' => 'civicrm_contact.is_deleted', + 'table_name' => 'civicrm_contact', + 'entity' => 'Contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'CheckBox', ), @@ -878,8 +1036,8 @@ function contact_getfields_expectedresult() { 'table_name' => 'civicrm_value_select_test_g_1', 'column_name' => 'our_special_field_1', 'pseudoconstant' => array( - 'optionGroupName' => 'our_special_field_20170124082923', - 'optionEditPath' => 'civicrm/admin/options/our_special_field_20170124082923', + 'optionGroupName' => 'our_special_field_20170207021937', + 'optionEditPath' => 'civicrm/admin/options/our_special_field_20170207021937', ), 'name' => 'custom_1', 'title' => 'Our special field', diff --git a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php index 67fadede7a..4c1cf9865d 100644 --- a/api/v3/examples/Contact/GroupFilterUsingContactAPI.php +++ b/api/v3/examples/Contact/GroupFilterUsingContactAPI.php @@ -47,10 +47,10 @@ function contact_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1, + 'id' => 3, 'values' => array( - '1' => array( - 'contact_id' => '1', + '3' => array( + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'man2@yahoo.com', @@ -86,8 +86,8 @@ function contact_get_expectedresult() { 'sic_code' => '', 'contact_is_deleted' => 0, 'current_employer' => '', - 'address_id' => '2', - 'street_address' => '1 my road', + 'address_id' => '', + 'street_address' => '', 'supplemental_address_1' => '', 'supplemental_address_2' => '', 'city' => '', @@ -115,7 +115,7 @@ function contact_get_expectedresult() { 'state_province_name' => '', 'state_province' => '', 'country' => '', - 'id' => '1', + 'id' => '3', ), ), ); diff --git a/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php b/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php index fe6ec8ee09..0ed2701530 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php +++ b/api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = array( - 'contact_id' => 23, + 'contact_id' => 28, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -18,7 +18,7 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'honor_contact_id' => 24, + 'honor_contact_id' => 29, ); try{ @@ -30,7 +30,8 @@ function contribution_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -55,7 +56,7 @@ function contribution_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '23', + 'contact_id' => '28', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -82,6 +83,7 @@ function contribution_create_expectedresult() { 'campaign_id' => '', 'creditnote_id' => '', 'tax_amount' => '', + 'revenue_recognition_date' => '', 'contribution_type_id' => '1', ), ), diff --git a/api/v3/examples/Contribution/ContributionCreateWithNote.php b/api/v3/examples/Contribution/ContributionCreateWithNote.php index 4a19762036..394b0c36ad 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithNote.php +++ b/api/v3/examples/Contribution/ContributionCreateWithNote.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = array( - 'contact_id' => 17, + 'contact_id' => 22, 'receive_date' => '2012-01-01', 'total_amount' => '100', 'financial_type_id' => 1, @@ -33,7 +33,8 @@ function contribution_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -58,7 +59,7 @@ function contribution_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '17', + 'contact_id' => '22', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '1', @@ -85,6 +86,7 @@ function contribution_create_expectedresult() { 'campaign_id' => '', 'creditnote_id' => '', 'tax_amount' => '', + 'revenue_recognition_date' => '', 'contribution_type_id' => '1', ), ), diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php index f756efed96..a798c940b1 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = array( - 'contact_id' => 19, + 'contact_id' => 24, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -20,7 +20,7 @@ function contribution_create_example() { 'contribution_status_id' => 1, 'soft_credit' => array( '1' => array( - 'contact_id' => 20, + 'contact_id' => 25, 'amount' => 50, 'soft_credit_type_id' => 3, ), @@ -36,7 +36,8 @@ function contribution_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -61,7 +62,7 @@ function contribution_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '19', + 'contact_id' => '24', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -88,6 +89,7 @@ function contribution_create_expectedresult() { 'campaign_id' => '', 'creditnote_id' => '', 'tax_amount' => '', + 'revenue_recognition_date' => '', 'contribution_type_id' => '1', ), ), diff --git a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php index 8d7126cb89..5209aa9aea 100644 --- a/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php +++ b/api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php @@ -9,7 +9,7 @@ */ function contribution_create_example() { $params = array( - 'contact_id' => 21, + 'contact_id' => 26, 'receive_date' => '20120511', 'total_amount' => '100', 'financial_type_id' => 1, @@ -18,7 +18,7 @@ function contribution_create_example() { 'net_amount' => '95', 'source' => 'SSF', 'contribution_status_id' => 1, - 'soft_credit_to' => 22, + 'soft_credit_to' => 27, ); try{ @@ -30,7 +30,8 @@ function contribution_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -55,7 +56,7 @@ function contribution_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '21', + 'contact_id' => '26', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', @@ -82,6 +83,7 @@ function contribution_create_expectedresult() { 'campaign_id' => '', 'creditnote_id' => '', 'tax_amount' => '', + 'revenue_recognition_date' => '', 'contribution_type_id' => '1', ), ), diff --git a/api/v3/examples/Contribution/Create.php b/api/v3/examples/Contribution/Create.php index 9135fe3f92..9b49970393 100644 --- a/api/v3/examples/Contribution/Create.php +++ b/api/v3/examples/Contribution/Create.php @@ -13,6 +13,7 @@ function contribution_create_example() { 'financial_type_id' => 1, 'contribution_page_id' => 1, 'trxn_id' => 12345, + 'is_pay_later' => 1, 'invoice_id' => 67890, 'source' => 'SSF', 'contribution_status_id' => 2, @@ -27,7 +28,8 @@ function contribution_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -59,7 +61,7 @@ function contribution_create_expectedresult() { 'receive_date' => '20120511000000', 'non_deductible_amount' => '', 'total_amount' => '100', - 'fee_amount' => '0', + 'fee_amount' => 0, 'net_amount' => '100', 'trxn_id' => '12345', 'invoice_id' => '67890', @@ -72,15 +74,15 @@ function contribution_create_expectedresult() { 'amount_level' => '', 'contribution_recur_id' => '', 'is_test' => '', - 'is_pay_later' => '', + 'is_pay_later' => '1', 'contribution_status_id' => '2', 'address_id' => '', 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', 'tax_amount' => '', - 'contribution_type_id' => '1', 'revenue_recognition_date' => '', + 'contribution_type_id' => '1', ), ), ); @@ -90,9 +92,9 @@ function contribution_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreateContributionPendingOnline" +* The test that created it is called "testCreateContributionPayLaterOnline" * and can be found at: -* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TaxContributionPageTest.php +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-master-git/ diff --git a/api/v3/examples/Contribution/CreateWithNestedLineItems.php b/api/v3/examples/Contribution/CreateWithNestedLineItems.php index 2c7234e419..741e176397 100644 --- a/api/v3/examples/Contribution/CreateWithNestedLineItems.php +++ b/api/v3/examples/Contribution/CreateWithNestedLineItems.php @@ -9,10 +9,14 @@ */ function contribution_create_example() { $params = array( - 'contact_id' => 1, + 'contact_id' => 11, 'receive_date' => '20120511', - 'total_amount' => '400', - 'financial_type_id' => 7, + 'total_amount' => '100', + 'financial_type_id' => 1, + 'payment_instrument_id' => 1, + 'non_deductible_amount' => '10', + 'fee_amount' => '50', + 'net_amount' => '90', 'trxn_id' => 12345, 'invoice_id' => 67890, 'source' => 'SSF', @@ -20,22 +24,16 @@ function contribution_create_example() { 'skipLineItem' => 1, 'api.line_item.create' => array( '0' => array( - 'price_field_id' => array( - '0' => 3, - ), - 'qty' => 1, - 'line_total' => '100', - 'unit_price' => '100', - 'financial_type_id' => 7, + 'price_field_id' => 1, + 'qty' => 2, + 'line_total' => '20', + 'unit_price' => '10', ), '1' => array( - 'price_field_id' => array( - '0' => 3, - ), + 'price_field_id' => 1, 'qty' => 1, - 'line_total' => '300', - 'unit_price' => '300', - 'financial_type_id' => 8, + 'line_total' => '80', + 'unit_price' => '80', ), ), ); @@ -49,7 +47,8 @@ function contribution_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -74,15 +73,15 @@ function contribution_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '1', - 'financial_type_id' => '7', + 'contact_id' => '11', + 'financial_type_id' => '1', 'contribution_page_id' => '', - 'payment_instrument_id' => '4', + 'payment_instrument_id' => '1', 'receive_date' => '20120511000000', - 'non_deductible_amount' => '', - 'total_amount' => '435', - 'fee_amount' => 0, - 'net_amount' => '435', + 'non_deductible_amount' => '10', + 'total_amount' => '100', + 'fee_amount' => '50', + 'net_amount' => '90', 'trxn_id' => '12345', 'invoice_id' => '67890', 'currency' => 'USD', @@ -100,8 +99,9 @@ function contribution_create_expectedresult() { 'check_number' => '', 'campaign_id' => '', 'creditnote_id' => '', - 'tax_amount' => '35', - 'contribution_type_id' => '7', + 'tax_amount' => 0, + 'revenue_recognition_date' => '', + 'contribution_type_id' => '1', 'api.line_item.create' => array( '0' => array( 'is_error' => 0, @@ -114,18 +114,16 @@ function contribution_create_expectedresult() { 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', 'contribution_id' => '1', - 'price_field_id' => array( - '0' => '3', - ), + 'price_field_id' => '1', 'label' => 'line item', - 'qty' => '1', - 'unit_price' => '100', - 'line_total' => '100', + 'qty' => '2', + 'unit_price' => '10', + 'line_total' => '20', 'participant_count' => '', 'price_field_value_id' => '', - 'financial_type_id' => '7', - 'deductible_amount' => '', - 'tax_amount' => '20', + 'financial_type_id' => '', + 'non_deductible_amount' => '', + 'tax_amount' => '', ), ), ), @@ -140,18 +138,16 @@ function contribution_create_expectedresult() { 'entity_table' => 'civicrm_contribution', 'entity_id' => '1', 'contribution_id' => '1', - 'price_field_id' => array( - '0' => '3', - ), + 'price_field_id' => '1', 'label' => 'line item', 'qty' => '1', - 'unit_price' => '300', - 'line_total' => '300', + 'unit_price' => '80', + 'line_total' => '80', 'participant_count' => '', 'price_field_value_id' => '', - 'financial_type_id' => '8', - 'deductible_amount' => '', - 'tax_amount' => '15', + 'financial_type_id' => '', + 'non_deductible_amount' => '', + 'tax_amount' => '', ), ), ), @@ -167,7 +163,7 @@ function contribution_create_expectedresult() { * This example has been generated from the API test suite. * The test that created it is called "testCreateContributionChainedLineItems" * and can be found at: -* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TaxContributionPageTest.php +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-master-git/ diff --git a/api/v3/examples/Contribution/Delete.php b/api/v3/examples/Contribution/Delete.php index 0242584211..c22b1b102d 100644 --- a/api/v3/examples/Contribution/Delete.php +++ b/api/v3/examples/Contribution/Delete.php @@ -19,7 +19,8 @@ function contribution_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -53,7 +54,7 @@ function contribution_delete_expectedresult() { * This example has been generated from the API test suite. * The test that created it is called "testDeleteContribution" * and can be found at: -* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/TaxContributionPageTest.php +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * * You can see the outcome of the API tests at * https://test.civicrm.org/job/CiviCRM-master-git/ diff --git a/api/v3/examples/Contribution/Get.php b/api/v3/examples/Contribution/Get.php index 3649403bea..0c5c06f58f 100644 --- a/api/v3/examples/Contribution/Get.php +++ b/api/v3/examples/Contribution/Get.php @@ -19,7 +19,8 @@ function contribution_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -43,7 +44,7 @@ function contribution_get_expectedresult() { 'id' => 1, 'values' => array( '1' => array( - 'contact_id' => '4', + 'contact_id' => '3', 'contact_type' => 'Individual', 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', @@ -63,10 +64,11 @@ function contribution_get_expectedresult() { 'thankyou_date' => '', 'contribution_source' => 'SSF', 'amount_level' => '', + 'contribution_recur_id' => '', 'is_test' => 0, 'is_pay_later' => 0, 'contribution_status_id' => '1', - 'check_number' => '', + 'contribution_check_number' => '', 'contribution_campaign_id' => '', 'financial_type_id' => '1', 'financial_type' => 'Donation', @@ -78,16 +80,17 @@ function contribution_get_expectedresult() { 'fulfilled_date' => '', 'contribution_start_date' => '', 'contribution_end_date' => '', - 'contribution_recur_id' => '', 'financial_account_id' => '1', 'accounting_code' => '4200', + 'campaign_id' => '', + 'contribution_campaign_title' => '', 'contribution_note' => '', 'contribution_batch' => '', 'contribution_status' => 'Completed', 'payment_instrument' => 'Check', 'payment_instrument_id' => '4', 'instrument_id' => '4', - 'contribution_check_number' => '', + 'check_number' => '', 'id' => '1', 'contribution_type_id' => '1', ), @@ -99,7 +102,7 @@ function contribution_get_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testGetContributionLegacyBehaviour" +* The test that created it is called "testGetContribution" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionTest.php * diff --git a/api/v3/examples/ContributionPage/Create.php b/api/v3/examples/ContributionPage/Create.php index bff46b83de..8139aa301a 100644 --- a/api/v3/examples/ContributionPage/Create.php +++ b/api/v3/examples/ContributionPage/Create.php @@ -13,6 +13,9 @@ function contribution_page_create_example() { 'goal_amount' => 34567, 'is_pay_later' => 1, 'is_monetary' => TRUE, + 'is_email_receipt' => TRUE, + 'receipt_from_email' => 'yourconscience@donate.com', + 'receipt_from_name' => 'Ego Freud', ); try{ @@ -77,11 +80,9 @@ function contribution_page_create_expectedresult() { 'thankyou_title' => '', 'thankyou_text' => '', 'thankyou_footer' => '', - 'is_for_organization' => '', - 'for_organization' => '', - 'is_email_receipt' => '', - 'receipt_from_name' => '', - 'receipt_from_email' => '', + 'is_email_receipt' => '1', + 'receipt_from_name' => 'Ego Freud', + 'receipt_from_email' => 'yourconscience@donate.com', 'cc_receipt' => '', 'bcc_receipt' => '', 'receipt_text' => '', diff --git a/api/v3/examples/ContributionPage/Get.php b/api/v3/examples/ContributionPage/Get.php index cc7cd888b2..0a6b234e90 100644 --- a/api/v3/examples/ContributionPage/Get.php +++ b/api/v3/examples/ContributionPage/Get.php @@ -7,7 +7,6 @@ */ function contribution_page_get_example() { $params = array( - 'amount' => '34567', 'currency' => 'NZD', 'financial_type_id' => 1, ); @@ -55,17 +54,20 @@ function contribution_page_get_expectedresult() { 'is_confirm_enabled' => '1', 'is_recur_interval' => 0, 'is_recur_installments' => 0, + 'adjust_recur_start_date' => 0, 'is_pay_later' => '1', 'is_partial_payment' => 0, 'is_allow_other_amount' => 0, 'goal_amount' => '34567.00', - 'is_for_organization' => 0, - 'is_email_receipt' => 0, + 'is_email_receipt' => '1', + 'receipt_from_name' => 'Ego Freud', + 'receipt_from_email' => 'yourconscience@donate.com', 'is_active' => '1', 'amount_block_is_active' => '1', 'currency' => 'NZD', 'is_share' => '1', 'is_billing_required' => 0, + 'contribution_type_id' => '1', ), ), ); @@ -75,7 +77,7 @@ function contribution_page_get_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testGetContributionPageByAmount" +* The test that created it is called "testGetBasicContributionPage" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php * diff --git a/api/v3/examples/ContributionPage/Submit.php b/api/v3/examples/ContributionPage/Submit.php index db56853f5d..c24c4dbcb3 100644 --- a/api/v3/examples/ContributionPage/Submit.php +++ b/api/v3/examples/ContributionPage/Submit.php @@ -9,16 +9,14 @@ */ function contribution_page_submit_example() { $params = array( - 'price_3' => '', 'id' => 1, - 'amount' => 10, + 'pledge_amount' => array( + '2' => 1, + ), 'billing_first_name' => 'Billy', 'billing_middle_name' => 'Goat', 'billing_last_name' => 'Gruff', 'email' => 'billy@goat.gruff', - 'selectMembership' => array( - '0' => 1, - ), 'payment_processor_id' => 1, 'credit_card_number' => '4111111111111111', 'credit_card_type' => 'Visa', @@ -27,9 +25,12 @@ function contribution_page_submit_example() { 'Y' => 2040, ), 'cvv2' => 123, - 'is_recur' => 1, - 'frequency_interval' => 1, - 'frequency_unit' => 'month', + 'pledge_id' => '1', + 'cid' => '77', + 'contact_id' => '77', + 'amount' => '100', + 'is_pledge' => TRUE, + 'pledge_block_id' => 2, ); try{ @@ -71,7 +72,7 @@ function contribution_page_submit_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testSubmitMembershipPriceSetPaymentPaymentProcessorRecurDelayed" +* The test that created it is called "testSubmitPledgePayment" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php * diff --git a/api/v3/examples/ContributionRecur/Delete.php b/api/v3/examples/ContributionRecur/Delete.php index f5b732f6f0..fba4f05850 100644 --- a/api/v3/examples/ContributionRecur/Delete.php +++ b/api/v3/examples/ContributionRecur/Delete.php @@ -7,7 +7,7 @@ */ function contribution_recur_delete_example() { $params = array( - 'id' => 3, + 'id' => 4, ); try{ diff --git a/api/v3/examples/Country/Create.php b/api/v3/examples/Country/Create.php index 091baaa5ef..988b9bcfc9 100644 --- a/api/v3/examples/Country/Create.php +++ b/api/v3/examples/Country/Create.php @@ -43,10 +43,10 @@ function country_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1252, + 'id' => 1254, 'values' => array( - '1252' => array( - 'id' => '1252', + '1254' => array( + 'id' => '1254', 'name' => 'Made Up Land', 'iso_code' => 'ZZ', 'country_code' => '', diff --git a/api/v3/examples/Country/Delete.php b/api/v3/examples/Country/Delete.php index a631c34a07..79fcb15348 100644 --- a/api/v3/examples/Country/Delete.php +++ b/api/v3/examples/Country/Delete.php @@ -7,7 +7,7 @@ */ function country_delete_example() { $params = array( - 'id' => 1253, + 'id' => 1255, ); try{ diff --git a/api/v3/examples/Country/Get.php b/api/v3/examples/Country/Get.php index d1cf00f99c..dcd4d4431e 100644 --- a/api/v3/examples/Country/Get.php +++ b/api/v3/examples/Country/Get.php @@ -41,10 +41,10 @@ function country_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 1254, + 'id' => 1256, 'values' => array( - '1254' => array( - 'id' => '1254', + '1256' => array( + 'id' => '1256', 'name' => 'Made Up Land', 'iso_code' => 'ZZ', 'region_id' => '1', diff --git a/api/v3/examples/EntityTag/Delete.php b/api/v3/examples/EntityTag/Delete.php index 9d117d4b9b..83d812b1bf 100644 --- a/api/v3/examples/EntityTag/Delete.php +++ b/api/v3/examples/EntityTag/Delete.php @@ -7,8 +7,8 @@ */ function entity_tag_delete_example() { $params = array( - 'contact_id_h' => 37, - 'tag_id' => '17', + 'contact_id_h' => 31, + 'tag_id' => '15', ); try{ diff --git a/api/v3/examples/EntityTag/Get.php b/api/v3/examples/EntityTag/Get.php index a51e13c015..d3b1392145 100644 --- a/api/v3/examples/EntityTag/Get.php +++ b/api/v3/examples/EntityTag/Get.php @@ -7,7 +7,7 @@ */ function entity_tag_get_example() { $params = array( - 'contact_id' => 3, + 'contact_id' => 15, ); try{ @@ -41,10 +41,13 @@ function entity_tag_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 6, + 'id' => 5, 'values' => array( - '6' => array( - 'tag_id' => '6', + '5' => array( + 'id' => '5', + 'entity_table' => 'civicrm_contact', + 'entity_id' => '15', + 'tag_id' => '10', ), ), ); diff --git a/api/v3/examples/Event/IsFullOption.php b/api/v3/examples/Event/IsFullOption.php index 0eca96b971..556e307c48 100644 --- a/api/v3/examples/Event/IsFullOption.php +++ b/api/v3/examples/Event/IsFullOption.php @@ -67,7 +67,7 @@ function event_getsingle_expectedresult() { 'allow_selfcancelxfer' => 0, 'selfcancelxfer_time' => 0, 'is_template' => 0, - 'created_date' => '2017-01-24 08:34:25', + 'created_date' => '2017-02-07 02:22:22', 'is_share' => '1', 'is_confirm_enabled' => '1', 'is_billing_required' => 0, diff --git a/api/v3/examples/Group/GetFields.php b/api/v3/examples/Group/GetFields.php index 22dfe5250c..0247cb3e9e 100644 --- a/api/v3/examples/Group/GetFields.php +++ b/api/v3/examples/Group/GetFields.php @@ -50,6 +50,9 @@ function group_getfields_expectedresult() { 'title' => 'Group ID', 'description' => 'Group ID', 'required' => TRUE, + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'api.aliases' => array( '0' => 'group_id', ), @@ -61,6 +64,9 @@ function group_getfields_expectedresult() { 'description' => 'Internal name of Group.', 'maxlength' => 64, 'size' => 30, + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'title' => array( 'name' => 'title', @@ -69,6 +75,9 @@ function group_getfields_expectedresult() { 'description' => 'Name of Group.', 'maxlength' => 64, 'size' => 30, + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'api.required' => 1, ), 'description' => array( @@ -78,6 +87,9 @@ function group_getfields_expectedresult() { 'description' => 'Optional verbose description of the group.', 'rows' => 2, 'cols' => 60, + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'html' => array( 'type' => 'TextArea', 'rows' => 2, @@ -91,12 +103,18 @@ function group_getfields_expectedresult() { 'description' => 'Module or process which created this group.', 'maxlength' => 64, 'size' => 30, + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'saved_search_id' => array( 'name' => 'saved_search_id', 'type' => 1, 'title' => 'Saved Search ID', 'description' => 'FK to saved search table.', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'FKClassName' => 'CRM_Contact_DAO_SavedSearch', 'FKApiName' => 'SavedSearch', ), @@ -105,6 +123,9 @@ function group_getfields_expectedresult() { 'type' => 16, 'title' => 'Group Enabled', 'description' => 'Is this entry active?', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'api.default' => 1, ), 'visibility' => array( @@ -115,6 +136,9 @@ function group_getfields_expectedresult() { 'maxlength' => 24, 'size' => 20, 'default' => 'User and User Admin Only', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'html' => array( 'type' => 'Select', 'maxlength' => 24, @@ -129,18 +153,27 @@ function group_getfields_expectedresult() { 'type' => 32, 'title' => 'Group Where Clause', 'description' => 'the sql where clause if a saved search acl', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'select_tables' => array( 'name' => 'select_tables', 'type' => 32, 'title' => 'Tables For Select Clause', 'description' => 'the tables to be included in a select data', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'where_tables' => array( 'name' => 'where_tables', 'type' => 32, 'title' => 'Tables For Where Clause', 'description' => 'the tables to be included in the count statement', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'group_type' => array( 'name' => 'group_type', @@ -149,6 +182,9 @@ function group_getfields_expectedresult() { 'description' => 'FK to group type', 'maxlength' => 128, 'size' => 45, + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'pseudoconstant' => array( 'optionGroupName' => 'group_type', 'optionEditPath' => 'civicrm/admin/options/group_type', @@ -160,6 +196,9 @@ function group_getfields_expectedresult() { 'title' => 'Group Cache Date', 'description' => 'Date when we created the cache for a smart group', 'required' => '', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'refresh_date' => array( 'name' => 'refresh_date', @@ -167,35 +206,53 @@ function group_getfields_expectedresult() { 'title' => 'Next Group Refresh Time', 'description' => 'Date and time when we need to refresh the cache next.', 'required' => '', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'parents' => array( 'name' => 'parents', 'type' => 32, 'title' => 'Group Parents', 'description' => 'IDs of the parent(s)', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'children' => array( 'name' => 'children', 'type' => 32, 'title' => 'Group Children', 'description' => 'IDs of the child(ren)', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'is_hidden' => array( 'name' => 'is_hidden', 'type' => 16, 'title' => 'Group is Hidden', 'description' => 'Is this group hidden?', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'is_reserved' => array( 'name' => 'is_reserved', 'type' => 16, 'title' => 'Group is Reserved', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', ), 'created_id' => array( 'name' => 'created_id', 'type' => 1, 'title' => 'Group Created By', 'description' => 'FK to contact table.', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'FKApiName' => 'Contact', ), @@ -204,6 +261,9 @@ function group_getfields_expectedresult() { 'type' => 1, 'title' => 'Group Modified By', 'description' => 'FK to contact table.', + 'table_name' => 'civicrm_group', + 'entity' => 'Group', + 'bao' => 'CRM_Contact_BAO_Group', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'FKApiName' => 'Contact', ), diff --git a/api/v3/examples/Job/Create.php b/api/v3/examples/Job/Create.php index 5c8514e02f..1060d3ccf7 100644 --- a/api/v3/examples/Job/Create.php +++ b/api/v3/examples/Job/Create.php @@ -48,13 +48,14 @@ function job_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 29, + 'id' => 30, 'values' => array( '0' => array( - 'id' => '29', + 'id' => '30', 'domain_id' => '1', 'run_frequency' => 'Daily', 'last_run' => '', + 'scheduled_run_date' => '', 'name' => 'API_Test_Job', 'description' => 'A long description written by hand in cursive', 'api_entity' => 'ApiTestEntity', diff --git a/api/v3/examples/Job/Delete.php b/api/v3/examples/Job/Delete.php index fe854b3d27..40264b4c11 100644 --- a/api/v3/examples/Job/Delete.php +++ b/api/v3/examples/Job/Delete.php @@ -7,7 +7,7 @@ */ function job_delete_example() { $params = array( - 'id' => 30, + 'id' => 31, ); try{ diff --git a/api/v3/examples/Logging/Get.php b/api/v3/examples/Logging/Get.php index 2f9a4dae9b..0e95cdaf50 100644 --- a/api/v3/examples/Logging/Get.php +++ b/api/v3/examples/Logging/Get.php @@ -44,52 +44,52 @@ function logging_get_expectedresult() { 'values' => array( '0' => array( 'action' => 'Update', - 'id' => '9', + 'id' => '3', 'field' => 'sort_name', 'from' => 'Anderson, Anthony', 'to' => 'Dwarf, Dopey', 'table' => 'civicrm_contact', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '1' => array( 'action' => 'Update', - 'id' => '9', + 'id' => '3', 'field' => 'display_name', 'from' => 'Mr. Anthony Anderson II', 'to' => 'Mr. Dopey Dwarf II', 'table' => 'civicrm_contact', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '2' => array( 'action' => 'Update', - 'id' => '9', + 'id' => '3', 'field' => 'first_name', 'from' => 'Anthony', 'to' => 'Dopey', 'table' => 'civicrm_contact', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '3' => array( 'action' => 'Update', - 'id' => '9', + 'id' => '3', 'field' => 'last_name', 'from' => 'Anderson', 'to' => 'Dwarf', 'table' => 'civicrm_contact', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '4' => array( 'action' => 'Update', - 'id' => '9', + 'id' => '3', 'field' => 'modified_date', - 'from' => '2016-04-06 02:53:27', - 'to' => '2016-04-06 02:53:44', + 'from' => '2017-02-07 02:36:28', + 'to' => '2017-02-07 02:36:46', 'table' => 'civicrm_contact', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '5' => array( @@ -99,7 +99,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '2', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '6' => array( @@ -107,9 +107,9 @@ function logging_get_expectedresult() { 'id' => '2', 'field' => 'contact_id', 'from' => '', - 'to' => '9', + 'to' => '3', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '7' => array( @@ -119,7 +119,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '8' => array( @@ -129,7 +129,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 'dopey@mail.com', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '9' => array( @@ -139,7 +139,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '10' => array( @@ -149,7 +149,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '11' => array( @@ -159,7 +159,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '12' => array( @@ -169,7 +169,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => 0, 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '13' => array( @@ -179,7 +179,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '14' => array( @@ -189,7 +189,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '15' => array( @@ -199,7 +199,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), '16' => array( @@ -209,7 +209,7 @@ function logging_get_expectedresult() { 'from' => '', 'to' => '', 'table' => 'civicrm_email', - 'log_date' => '2016-04-06 02:53:44', + 'log_date' => '2017-02-07 02:36:46', 'log_conn_id' => 'wooty wop wop', ), ), diff --git a/api/v3/examples/Logging/Revert.php b/api/v3/examples/Logging/Revert.php index 1dad994344..c085b4497c 100644 --- a/api/v3/examples/Logging/Revert.php +++ b/api/v3/examples/Logging/Revert.php @@ -8,7 +8,7 @@ function logging_revert_example() { $params = array( 'log_conn_id' => 'woot', - 'log_date' => '2016-04-06 02:52:07', + 'log_date' => '2017-02-07 02:35:06', ); try{ diff --git a/api/v3/examples/Mailing/Create.php b/api/v3/examples/Mailing/Create.php index 0c5410ce6f..b4bcf6f713 100644 --- a/api/v3/examples/Mailing/Create.php +++ b/api/v3/examples/Mailing/Create.php @@ -9,18 +9,19 @@ function mailing_create_example() { $params = array( 'subject' => 'Hello {contact.display_name}', 'body_text' => 'This is {contact.display_name}. +https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

This is {contact.display_name}.

{domain.address}{action.optOutUrl}

', + 'body_html' => '

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'name' => 'mailing name', - 'created_id' => 9, + 'created_id' => 11, 'header_id' => '', 'footer_id' => '', 'groups' => array( 'include' => array( - '0' => 7, + '0' => 9, ), 'exclude' => array( - '0' => 8, + '0' => 10, ), ), 'mailings' => array( @@ -73,10 +74,10 @@ function mailing_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 4, + 'id' => 5, 'values' => array( - '4' => array( - 'id' => '4', + '5' => array( + 'id' => '5', 'domain_id' => '1', 'header_id' => '', 'footer_id' => '', @@ -93,9 +94,9 @@ function mailing_create_expectedresult() { 'template_options' => '', 'subject' => 'Hello {contact.display_name}', 'body_text' => 'This is {contact.display_name}. -https://civińcrm.org +https://civicrm.org {domain.address}{action.optOutUrl}', - 'body_html' => '

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', + 'body_html' => '

This is {contact.display_name}.

CiviCRM.org

{domain.address}{action.optOutUrl}

', 'url_tracking' => '1', 'forward_replies' => '', 'auto_responder' => '', @@ -103,7 +104,7 @@ https://civińcrm.org 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '9', + 'created_id' => '11', 'created_date' => '2013-07-28 08:49:19', 'scheduled_id' => '', 'scheduled_date' => '', @@ -119,6 +120,7 @@ https://civińcrm.org 'hash' => '', 'location_type_id' => '', 'email_selection_method' => '', + 'language' => '', 'api.mailing_job.create' => array( 'is_error' => 0, 'version' => 3, @@ -127,7 +129,7 @@ https://civińcrm.org 'values' => array( '0' => array( 'id' => '5', - 'mailing_id' => '4', + 'mailing_id' => '5', 'scheduled_date' => '20130728085413', 'start_date' => '', 'end_date' => '', @@ -148,9 +150,9 @@ https://civińcrm.org 'values' => array( '0' => array( 'id' => '4', - 'mailing_id' => '4', - 'contact_id' => '10', - 'email_id' => '10', + 'mailing_id' => '5', + 'contact_id' => '12', + 'email_id' => '12', 'api.contact.getvalue' => 'Mr. Includer Person II', 'api.email.getvalue' => 'include.me@example.org', ), diff --git a/api/v3/examples/Mailing/Delete.php b/api/v3/examples/Mailing/Delete.php index d274d8c825..b7f02cbc76 100644 --- a/api/v3/examples/Mailing/Delete.php +++ b/api/v3/examples/Mailing/Delete.php @@ -7,7 +7,7 @@ */ function mailing_delete_example() { $params = array( - 'id' => 18, + 'id' => 20, ); try{ diff --git a/api/v3/examples/Mailing/Submit.php b/api/v3/examples/Mailing/Submit.php index 1b328b7e6c..ffaae8983d 100644 --- a/api/v3/examples/Mailing/Submit.php +++ b/api/v3/examples/Mailing/Submit.php @@ -9,7 +9,7 @@ function mailing_submit_example() { $params = array( 'scheduled_date' => '2014-12-13 10:00:00', 'approval_date' => '2014-12-13 00:00:00', - 'id' => 16, + 'id' => 18, ); try{ @@ -43,23 +43,27 @@ function mailing_submit_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 16, + 'id' => 18, 'values' => array( - '16' => array( - 'id' => '16', + '18' => array( + 'id' => '18', 'domain_id' => '1', 'header_id' => '', - 'footer_id' => '24', + 'footer_id' => '27', 'reply_id' => '8', 'unsubscribe_id' => '5', 'resubscribe_id' => '6', 'optout_id' => '7', 'name' => 'mailing name', + 'mailing_type' => 'standalone', 'from_name' => 'FIXME', 'from_email' => 'info@EXAMPLE.ORG', 'replyto_email' => 'info@EXAMPLE.ORG', + 'template_type' => 'traditional', + 'template_options' => '', 'subject' => 'Hello {contact.display_name}', 'body_text' => 'This is {contact.display_name}. +https://civicrm.org {domain.address}{action.optOutUrl}', 'body_html' => '

Look ma, magic tokens in the markup!

', 'url_tracking' => '1', @@ -69,11 +73,11 @@ function mailing_submit_expectedresult() { 'is_completed' => '', 'msg_template_id' => '', 'override_verp' => '1', - 'created_id' => '35', + 'created_id' => '40', 'created_date' => '2013-07-28 08:49:19', - 'scheduled_id' => '36', + 'scheduled_id' => '41', 'scheduled_date' => '20130728085413', - 'approver_id' => '36', + 'approver_id' => '41', 'approval_date' => '20130728085413', 'approval_status_id' => '1', 'approval_note' => '', @@ -83,8 +87,9 @@ function mailing_submit_expectedresult() { 'dedupe_email' => '1', 'sms_provider_id' => '', 'hash' => '67eac7789eaee00', - 'location_type_id' => 0, + 'location_type_id' => '', 'email_selection_method' => 'automatic', + 'language' => '', ), ), ); diff --git a/api/v3/examples/MailingAB/Create.php b/api/v3/examples/MailingAB/Create.php index e1189215f1..c7ac42c59d 100644 --- a/api/v3/examples/MailingAB/Create.php +++ b/api/v3/examples/MailingAB/Create.php @@ -57,11 +57,13 @@ function mailing_a_b_create_expectedresult() { 'mailing_id_b' => '2', 'mailing_id_c' => '3', 'domain_id' => '1', - 'testing_criteria_id' => '', - 'winner_criteria_id' => '', + 'testing_criteria' => 'subject', + 'winner_criteria' => 'open', 'specific_url' => '', - 'declare_winning_time' => '20150224231452', + 'declare_winning_time' => '20170209023708', 'group_percentage' => '10', + 'created_id' => '3', + 'created_date' => '2013-07-28 08:49:19', ), ), ); diff --git a/api/v3/examples/Membership/Create.php b/api/v3/examples/Membership/Create.php index 5f765f3f79..107c3cc7c3 100644 --- a/api/v3/examples/Membership/Create.php +++ b/api/v3/examples/Membership/Create.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = array( - 'contact_id' => 76, - 'membership_type_id' => 45, + 'contact_id' => 79, + 'membership_type_id' => 47, 'join_date' => '2006-01-21', 'start_date' => '2006-01-21', 'end_date' => '2006-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 29, + 'status_id' => 30, ); try{ @@ -52,13 +52,13 @@ function membership_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '76', - 'membership_type_id' => '45', + 'contact_id' => '79', + 'membership_type_id' => '47', 'join_date' => '20060121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '29', + 'status_id' => '30', 'is_override' => '1', 'owner_membership_id' => '', 'max_related' => '', diff --git a/api/v3/examples/Membership/CreateWithCustomData.php b/api/v3/examples/Membership/CreateWithCustomData.php index fe9516e663..42fa4d5b8b 100644 --- a/api/v3/examples/Membership/CreateWithCustomData.php +++ b/api/v3/examples/Membership/CreateWithCustomData.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = array( - 'contact_id' => 88, - 'membership_type_id' => 53, + 'contact_id' => 91, + 'membership_type_id' => 55, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 33, + 'status_id' => 34, 'custom_1' => 'custom string', ); @@ -53,13 +53,13 @@ function membership_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '88', - 'membership_type_id' => '53', + 'contact_id' => '91', + 'membership_type_id' => '55', 'join_date' => '20090121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '33', + 'status_id' => '34', 'is_override' => '1', 'owner_membership_id' => '', 'max_related' => '', diff --git a/api/v3/examples/Membership/FilterIsCurrent.php b/api/v3/examples/Membership/FilterIsCurrent.php index 13dc628132..92109b857a 100644 --- a/api/v3/examples/Membership/FilterIsCurrent.php +++ b/api/v3/examples/Membership/FilterIsCurrent.php @@ -9,7 +9,7 @@ */ function membership_get_example() { $params = array( - 'contact_id' => 44, + 'contact_id' => 47, 'filters' => array( 'is_current' => 1, ), @@ -50,13 +50,13 @@ function membership_get_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '44', - 'membership_type_id' => '27', + 'contact_id' => '47', + 'membership_type_id' => '29', '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' => '21', + 'status_id' => '22', 'is_override' => '1', 'is_test' => 0, 'is_pay_later' => 0, diff --git a/api/v3/examples/Membership/Get.php b/api/v3/examples/Membership/Get.php index 20f24d537d..8c4fb2aed6 100644 --- a/api/v3/examples/Membership/Get.php +++ b/api/v3/examples/Membership/Get.php @@ -7,7 +7,7 @@ */ function membership_get_example() { $params = array( - 'membership_type_id' => 21, + 'membership_type_id' => 23, ); try{ @@ -45,19 +45,19 @@ function membership_get_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '35', - 'membership_type_id' => '21', + 'contact_id' => '38', + 'membership_type_id' => '23', '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' => '18', + 'status_id' => '19', 'is_override' => '1', 'is_test' => 0, 'is_pay_later' => 0, + 'custom_1' => 'custom string', 'membership_name' => 'General', 'relationship_name' => 'Child of', - 'custom_1' => 'custom string', 'custom_1_1' => 'custom string', ), ), diff --git a/api/v3/examples/Membership/UpdateCustomData.php b/api/v3/examples/Membership/UpdateCustomData.php index 1b593b34c2..f93f9d1bcd 100644 --- a/api/v3/examples/Membership/UpdateCustomData.php +++ b/api/v3/examples/Membership/UpdateCustomData.php @@ -7,14 +7,14 @@ */ function membership_create_example() { $params = array( - 'contact_id' => 106, - 'membership_type_id' => 65, + 'contact_id' => 112, + 'membership_type_id' => 69, 'join_date' => '2009-01-21', 'start_date' => '2009-01-21', 'end_date' => '2009-12-21', 'source' => 'Payment', 'is_override' => 1, - 'status_id' => 39, + 'status_id' => 41, 'custom_1' => 'custom string', ); @@ -53,13 +53,13 @@ function membership_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '106', - 'membership_type_id' => '65', + 'contact_id' => '112', + 'membership_type_id' => '69', 'join_date' => '20090121000000', 'start_date' => '2013-07-29 00:00:00', 'end_date' => '2013-08-04 00:00:00', 'source' => 'Payment', - 'status_id' => '39', + 'status_id' => '41', 'is_override' => '1', 'owner_membership_id' => '', 'max_related' => '', diff --git a/api/v3/examples/MembershipType/Create.php b/api/v3/examples/MembershipType/Create.php index 81cff6e5ae..1a01818506 100644 --- a/api/v3/examples/MembershipType/Create.php +++ b/api/v3/examples/MembershipType/Create.php @@ -9,7 +9,7 @@ function membership_type_create_example() { $params = array( 'name' => '40+ Membership', 'description' => 'people above 40 are given health instructions', - 'member_of_contact_id' => 13, + 'member_of_contact_id' => 7, 'financial_type_id' => 1, 'domain_id' => '1', 'minimum_fee' => '200', @@ -57,7 +57,7 @@ function membership_type_create_expectedresult() { 'domain_id' => '1', 'name' => '40+ Membership', 'description' => 'people above 40 are given health instructions', - 'member_of_contact_id' => '13', + 'member_of_contact_id' => '7', 'financial_type_id' => '1', 'minimum_fee' => '200', 'duration_unit' => 'month', diff --git a/api/v3/examples/MembershipType/Get.php b/api/v3/examples/MembershipType/Get.php index f111b04bd4..e9904be804 100644 --- a/api/v3/examples/MembershipType/Get.php +++ b/api/v3/examples/MembershipType/Get.php @@ -48,7 +48,7 @@ function membership_type_get_expectedresult() { 'domain_id' => '1', 'name' => 'General', 'member_of_contact_id' => '4', - 'financial_type_id' => '1', + 'financial_type_id' => '2', 'minimum_fee' => '0.00', 'duration_unit' => 'year', 'duration_interval' => '1', @@ -56,6 +56,7 @@ function membership_type_get_expectedresult() { 'visibility' => 'Public', 'auto_renew' => 0, 'is_active' => '1', + 'contribution_type_id' => '2', ), ), ); diff --git a/api/v3/examples/MessageTemplate/Create.php b/api/v3/examples/MessageTemplate/Create.php index 0941182339..7f2f51393b 100644 --- a/api/v3/examples/MessageTemplate/Create.php +++ b/api/v3/examples/MessageTemplate/Create.php @@ -7,11 +7,11 @@ */ function message_template_create_example() { $params = array( - 'msg_title' => 'msg_title_165', - 'msg_subject' => 'msg_subject_165', - 'msg_text' => 'msg_text_165', - 'msg_html' => 'msg_html_165', - 'workflow_id' => 165, + 'msg_title' => 'msg_title_284', + 'msg_subject' => 'msg_subject_284', + 'msg_text' => 'msg_text_284', + 'msg_html' => 'msg_html_284', + 'workflow_id' => 284, 'is_default' => '1', 'is_reserved' => 1, ); @@ -47,16 +47,16 @@ function message_template_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 67, + 'id' => 69, 'values' => array( - '67' => array( - 'id' => '67', - 'msg_title' => 'msg_title_165', - 'msg_subject' => 'msg_subject_165', - 'msg_text' => 'msg_text_165', - 'msg_html' => 'msg_html_165', + '69' => array( + 'id' => '69', + 'msg_title' => 'msg_title_284', + 'msg_subject' => 'msg_subject_284', + 'msg_text' => 'msg_text_284', + 'msg_html' => 'msg_html_284', 'is_active' => '1', - 'workflow_id' => '165', + 'workflow_id' => '284', 'is_default' => '1', 'is_reserved' => '1', 'is_sms' => '', diff --git a/api/v3/examples/MessageTemplate/Delete.php b/api/v3/examples/MessageTemplate/Delete.php index 1d47b6f0c8..388e12c2ae 100644 --- a/api/v3/examples/MessageTemplate/Delete.php +++ b/api/v3/examples/MessageTemplate/Delete.php @@ -7,7 +7,7 @@ */ function message_template_delete_example() { $params = array( - 'id' => 70, + 'id' => 72, ); try{ diff --git a/api/v3/examples/MessageTemplate/Get.php b/api/v3/examples/MessageTemplate/Get.php index d3ab1005bc..318d8aada3 100644 --- a/api/v3/examples/MessageTemplate/Get.php +++ b/api/v3/examples/MessageTemplate/Get.php @@ -7,11 +7,11 @@ */ function message_template_get_example() { $params = array( - 'msg_title' => 'msg_title_166', - 'msg_subject' => 'msg_subject_166', - 'msg_text' => 'msg_text_166', - 'msg_html' => 'msg_html_166', - 'workflow_id' => 166, + 'msg_title' => 'msg_title_285', + 'msg_subject' => 'msg_subject_285', + 'msg_text' => 'msg_text_285', + 'msg_html' => 'msg_html_285', + 'workflow_id' => 285, 'is_default' => '1', 'is_reserved' => 1, ); @@ -47,20 +47,20 @@ function message_template_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 68, + 'id' => 70, 'values' => array( - '68' => array( - 'id' => '68', - 'msg_title' => 'msg_title_166', - 'msg_subject' => 'msg_subject_166', - 'msg_text' => 'msg_text_166', - 'msg_html' => 'msg_html_166', + '70' => array( + 'id' => '70', + 'msg_title' => 'msg_title_285', + 'msg_subject' => 'msg_subject_285', + 'msg_text' => 'msg_text_285', + 'msg_html' => 'msg_html_285', 'is_active' => '1', - 'workflow_id' => '166', + 'workflow_id' => '285', 'is_default' => '1', 'is_reserved' => '1', 'is_sms' => '1', - 'pdf_format_id' => '166', + 'pdf_format_id' => '285', ), ), ); diff --git a/api/v3/examples/OptionGroup/Create.php b/api/v3/examples/OptionGroup/Create.php index 7220e3db6e..cee25ba50b 100644 --- a/api/v3/examples/OptionGroup/Create.php +++ b/api/v3/examples/OptionGroup/Create.php @@ -51,17 +51,18 @@ function option_group_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 93, + 'id' => 92, 'values' => array( '0' => array( - 'id' => '93', + 'id' => '92', 'name' => 'civicrm_event.amount.560', 'title' => '', 'description' => '', + 'data_type' => '', 'is_reserved' => '1', 'is_active' => '1', 'is_locked' => '', - 'api.OptionValue.create' => 784, + 'api.OptionValue.create' => 849, ), ), ); diff --git a/api/v3/examples/OptionGroup/Delete.php b/api/v3/examples/OptionGroup/Delete.php index cdf194ec75..20839505b8 100644 --- a/api/v3/examples/OptionGroup/Delete.php +++ b/api/v3/examples/OptionGroup/Delete.php @@ -7,7 +7,7 @@ */ function option_group_delete_example() { $params = array( - 'id' => 98, + 'id' => 97, ); try{ diff --git a/api/v3/examples/Order/Cancel.php b/api/v3/examples/Order/Cancel.php index 30f5aad2c5..2e6ea262ca 100644 --- a/api/v3/examples/Order/Cancel.php +++ b/api/v3/examples/Order/Cancel.php @@ -45,7 +45,7 @@ function order_cancel_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '14', + 'contact_id' => '16', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', diff --git a/api/v3/examples/Order/Create.php b/api/v3/examples/Order/Create.php index 45ea551fcd..264b1493bd 100644 --- a/api/v3/examples/Order/Create.php +++ b/api/v3/examples/Order/Create.php @@ -7,7 +7,7 @@ */ function order_create_example() { $params = array( - 'contact_id' => 7, + 'contact_id' => 8, 'receive_date' => '2010-01-20', 'total_amount' => 200, 'financial_type_id' => 1, @@ -29,7 +29,7 @@ function order_create_example() { ), ), 'params' => array( - 'contact_id' => 7, + 'contact_id' => 8, 'membership_type_id' => 2, 'join_date' => '2006-01-21', 'start_date' => '2006-01-21', @@ -77,7 +77,7 @@ function order_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '7', + 'contact_id' => '8', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', diff --git a/api/v3/examples/Order/CreateOrderParticipant.php b/api/v3/examples/Order/CreateOrderParticipant.php index aa65ab5fd0..b1a8a10401 100644 --- a/api/v3/examples/Order/CreateOrderParticipant.php +++ b/api/v3/examples/Order/CreateOrderParticipant.php @@ -9,7 +9,7 @@ */ function order_create_example() { $params = array( - 'contact_id' => 10, + 'contact_id' => 11, 'receive_date' => '2010-01-20', 'total_amount' => 300, 'financial_type_id' => 1, @@ -41,7 +41,7 @@ function order_create_example() { ), ), 'params' => array( - 'contact_id' => 10, + 'contact_id' => 11, 'event_id' => 1, 'status_id' => 1, 'role_id' => 1, @@ -87,7 +87,7 @@ function order_create_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id' => '10', + 'contact_id' => '11', 'financial_type_id' => '1', 'contribution_page_id' => '', 'payment_instrument_id' => '4', diff --git a/api/v3/examples/Order/Get.php b/api/v3/examples/Order/Get.php index 10a3c2c849..720596c3d7 100644 --- a/api/v3/examples/Order/Get.php +++ b/api/v3/examples/Order/Get.php @@ -64,10 +64,11 @@ function order_get_expectedresult() { 'thankyou_date' => '', 'contribution_source' => '', 'amount_level' => '', + 'contribution_recur_id' => '', 'is_test' => 0, 'is_pay_later' => 0, 'contribution_status_id' => '1', - 'check_number' => '', + 'contribution_check_number' => '', 'contribution_campaign_id' => '', 'financial_type_id' => '1', 'financial_type' => 'Donation', @@ -79,7 +80,6 @@ function order_get_expectedresult() { 'fulfilled_date' => '', 'contribution_start_date' => '', 'contribution_end_date' => '', - 'contribution_recur_id' => '', 'financial_account_id' => '1', 'accounting_code' => '4200', 'campaign_id' => '', @@ -90,7 +90,7 @@ function order_get_expectedresult() { 'payment_instrument' => 'Check', 'payment_instrument_id' => '4', 'instrument_id' => '4', - 'contribution_check_number' => '', + 'check_number' => '', 'id' => '1', 'contribution_type_id' => '1', 'line_items' => array( @@ -106,7 +106,8 @@ function order_get_expectedresult() { 'line_total' => '100.00', 'price_field_value_id' => '1', 'financial_type_id' => '1', - 'deductible_amount' => '0.00', + 'non_deductible_amount' => '0.00', + 'contribution_type_id' => '1', ), ), ), diff --git a/api/v3/examples/Participant/Create.php b/api/v3/examples/Participant/Create.php index 8ab8b98dda..15aa07367e 100644 --- a/api/v3/examples/Participant/Create.php +++ b/api/v3/examples/Participant/Create.php @@ -7,8 +7,8 @@ */ function participant_create_example() { $params = array( - 'contact_id' => 4, - 'event_id' => 1, + 'contact_id' => 2, + 'event_id' => 2, 'status_id' => 1, 'role_id' => 1, 'register_date' => '2007-07-21 00:00:00', @@ -51,8 +51,8 @@ function participant_create_expectedresult() { 'values' => array( '4' => array( 'id' => '4', - 'contact_id' => '4', - 'event_id' => '1', + 'contact_id' => '2', + 'event_id' => '2', 'status_id' => '1', 'role_id' => '1', 'register_date' => '20070721000000', diff --git a/api/v3/examples/Participant/Get.php b/api/v3/examples/Participant/Get.php index 1e06e9540e..52ad6116ac 100644 --- a/api/v3/examples/Participant/Get.php +++ b/api/v3/examples/Participant/Get.php @@ -49,7 +49,7 @@ function participant_get_expectedresult() { 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '5', + 'event_id' => '6', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', @@ -60,8 +60,8 @@ function participant_get_expectedresult() { 'event_type' => 'Conference', 'participant_status_id' => '2', 'participant_status' => 'Attended', - 'participant_role' => 'Attendee', 'participant_role_id' => '1', + 'participant_role' => 'Attendee', 'participant_register_date' => '2007-02-19 00:00:00', 'participant_source' => 'Wimbeldon', 'participant_note' => '', diff --git a/api/v3/examples/Participant/NestedDelete.php b/api/v3/examples/Participant/NestedDelete.php index b9429731c7..37555e4beb 100644 --- a/api/v3/examples/Participant/NestedDelete.php +++ b/api/v3/examples/Participant/NestedDelete.php @@ -51,7 +51,7 @@ function participant_get_expectedresult() { 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '39', + 'event_id' => '41', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', @@ -62,14 +62,14 @@ function participant_get_expectedresult() { 'event_type' => 'Conference', 'participant_status_id' => '2', 'participant_status' => 'Attended', - 'participant_role' => 'Attendee', 'participant_role_id' => '1', + 'participant_role' => 'Attendee', 'participant_register_date' => '2007-02-19 00:00:00', 'participant_source' => 'Wimbeldon', 'participant_note' => '', 'participant_is_pay_later' => 0, 'participant_is_test' => 0, - 'participant_registered_by_id' => '', + 'participant_registered_by_id' => '1', 'participant_discount_name' => '', 'participant_campaign_id' => '', 'id' => '2', @@ -86,7 +86,7 @@ function participant_get_expectedresult() { 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '39', + 'event_id' => '41', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', @@ -97,8 +97,8 @@ function participant_get_expectedresult() { 'event_type' => 'Conference', 'participant_status_id' => '2', 'participant_status' => 'Attended', - 'participant_role' => 'Attendee', 'participant_role_id' => '1', + 'participant_role' => 'Attendee', 'participant_register_date' => '2007-02-19 00:00:00', 'participant_source' => 'Wimbeldon', 'participant_note' => '', diff --git a/api/v3/examples/Participant/NestedEventGet.php b/api/v3/examples/Participant/NestedEventGet.php index 78f22366da..c6b335e63d 100644 --- a/api/v3/examples/Participant/NestedEventGet.php +++ b/api/v3/examples/Participant/NestedEventGet.php @@ -52,7 +52,7 @@ function participant_get_expectedresult() { 'contact_sub_type' => '', 'sort_name' => 'Anderson, Anthony', 'display_name' => 'Mr. Anthony Anderson II', - 'event_id' => '6', + 'event_id' => '7', 'event_title' => 'Annual CiviCRM meet', 'event_start_date' => '2013-07-29 00:00:00', 'event_end_date' => '2013-08-04 00:00:00', @@ -63,8 +63,8 @@ function participant_get_expectedresult() { 'event_type' => 'Conference', 'participant_status_id' => '2', 'participant_status' => 'Attended', - 'participant_role' => 'Attendee', 'participant_role_id' => '1', + 'participant_role' => 'Attendee', 'participant_register_date' => '2007-02-19 00:00:00', 'participant_source' => 'Wimbeldon', 'participant_note' => '', @@ -78,10 +78,10 @@ function participant_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 6, + 'id' => 7, 'values' => array( '0' => array( - 'id' => '6', + 'id' => '7', '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', diff --git a/api/v3/examples/ParticipantStatusType/Create.php b/api/v3/examples/ParticipantStatusType/Create.php index 96a4481c51..9059a8b322 100644 --- a/api/v3/examples/ParticipantStatusType/Create.php +++ b/api/v3/examples/ParticipantStatusType/Create.php @@ -48,10 +48,10 @@ function participant_status_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 17, + 'id' => 18, 'values' => array( - '17' => array( - 'id' => '17', + '18' => array( + 'id' => '18', 'name' => 'test status', 'label' => 'I am a test', 'class' => 'Positive', diff --git a/api/v3/examples/ParticipantStatusType/Delete.php b/api/v3/examples/ParticipantStatusType/Delete.php index 258aa4af10..ae4fa45657 100644 --- a/api/v3/examples/ParticipantStatusType/Delete.php +++ b/api/v3/examples/ParticipantStatusType/Delete.php @@ -7,7 +7,7 @@ */ function participant_status_type_delete_example() { $params = array( - 'id' => 18, + 'id' => 19, ); try{ diff --git a/api/v3/examples/ParticipantStatusType/Get.php b/api/v3/examples/ParticipantStatusType/Get.php index 318d9b5e79..7eb41e6d0f 100644 --- a/api/v3/examples/ParticipantStatusType/Get.php +++ b/api/v3/examples/ParticipantStatusType/Get.php @@ -48,10 +48,10 @@ function participant_status_type_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 17, + 'id' => 18, 'values' => array( - '17' => array( - 'id' => '17', + '18' => array( + 'id' => '18', 'name' => 'test status', 'label' => 'I am a test', 'class' => 'Positive', diff --git a/api/v3/examples/Payment/Cancel.php b/api/v3/examples/Payment/Cancel.php index bd71ea4426..84e18f4407 100644 --- a/api/v3/examples/Payment/Cancel.php +++ b/api/v3/examples/Payment/Cancel.php @@ -20,7 +20,8 @@ function payment_cancel_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -47,7 +48,7 @@ function payment_cancel_expectedresult() { 'id' => 3, 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20160217204840', + 'trxn_date' => '20170207024650', 'total_amount' => '-150', 'fee_amount' => '0.00', 'net_amount' => '150.00', diff --git a/api/v3/examples/Payment/Create.php b/api/v3/examples/Payment/Create.php index 4a8efaae33..6ece14b33a 100644 --- a/api/v3/examples/Payment/Create.php +++ b/api/v3/examples/Payment/Create.php @@ -20,7 +20,8 @@ function payment_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -47,7 +48,7 @@ function payment_create_expectedresult() { 'id' => '3', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20160217204833', + 'trxn_date' => '20170207024646', 'total_amount' => '50', 'fee_amount' => '', 'net_amount' => '50', diff --git a/api/v3/examples/Payment/CreatePaymentWithLineItems.php b/api/v3/examples/Payment/CreatePaymentWithLineItems.php index b9a9b971c1..f2b1613a61 100644 --- a/api/v3/examples/Payment/CreatePaymentWithLineItems.php +++ b/api/v3/examples/Payment/CreatePaymentWithLineItems.php @@ -30,7 +30,8 @@ function payment_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -57,7 +58,7 @@ function payment_create_expectedresult() { 'id' => '3', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20160217204836', + 'trxn_date' => '20170207024648', 'total_amount' => '50', 'fee_amount' => '', 'net_amount' => '50', diff --git a/api/v3/examples/Payment/Delete.php b/api/v3/examples/Payment/Delete.php index c5be86b58c..51bc8727f9 100644 --- a/api/v3/examples/Payment/Delete.php +++ b/api/v3/examples/Payment/Delete.php @@ -20,7 +20,8 @@ function payment_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Payment/Get.php b/api/v3/examples/Payment/Get.php index c56d91ec57..ac1263d504 100644 --- a/api/v3/examples/Payment/Get.php +++ b/api/v3/examples/Payment/Get.php @@ -20,7 +20,8 @@ function payment_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Payment/UpdatePayment.php b/api/v3/examples/Payment/UpdatePayment.php index d240cbfe2e..81e017e223 100644 --- a/api/v3/examples/Payment/UpdatePayment.php +++ b/api/v3/examples/Payment/UpdatePayment.php @@ -24,7 +24,8 @@ function payment_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -51,7 +52,7 @@ function payment_create_expectedresult() { 'id' => '5', 'from_financial_account_id' => '7', 'to_financial_account_id' => '6', - 'trxn_date' => '20160217204847', + 'trxn_date' => '20170207024653', 'total_amount' => '100', 'fee_amount' => '', 'net_amount' => '100', diff --git a/api/v3/examples/PaymentProcessor/Create.php b/api/v3/examples/PaymentProcessor/Create.php index 7d911e279a..aa481f9fbc 100644 --- a/api/v3/examples/PaymentProcessor/Create.php +++ b/api/v3/examples/PaymentProcessor/Create.php @@ -52,7 +52,7 @@ function payment_processor_create_expectedresult() { 'domain_id' => '1', 'name' => 'API Test PP', 'description' => '', - 'payment_processor_type_id' => '18', + 'payment_processor_type_id' => '1', 'is_active' => '', 'is_default' => 0, 'is_test' => 0, @@ -68,6 +68,8 @@ function payment_processor_create_expectedresult() { 'billing_mode' => '1', 'is_recur' => 0, 'payment_type' => '1', + 'payment_instrument_id' => '1', + 'accepted_credit_cards' => '', ), ), ); diff --git a/api/v3/examples/PaymentProcessor/Delete.php b/api/v3/examples/PaymentProcessor/Delete.php index d726926a9a..a633f4c4bf 100644 --- a/api/v3/examples/PaymentProcessor/Delete.php +++ b/api/v3/examples/PaymentProcessor/Delete.php @@ -19,7 +19,8 @@ function payment_processor_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function payment_processor_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/PaymentProcessorType/Create.php b/api/v3/examples/PaymentProcessorType/Create.php index d7803ec404..d6fc4c1e14 100644 --- a/api/v3/examples/PaymentProcessorType/Create.php +++ b/api/v3/examples/PaymentProcessorType/Create.php @@ -24,7 +24,8 @@ function payment_processor_type_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -45,10 +46,10 @@ function payment_processor_type_create_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'id' => 15, + 'id' => 13, 'values' => array( '0' => array( - 'id' => '15', + 'id' => '13', 'name' => 'API_Test_PP', 'title' => 'API Test Payment Processor', 'description' => '', @@ -70,6 +71,7 @@ function payment_processor_type_create_expectedresult() { 'billing_mode' => '1', 'is_recur' => 0, 'payment_type' => '', + 'payment_instrument_id' => '1', ), ), ); diff --git a/api/v3/examples/PaymentProcessorType/Delete.php b/api/v3/examples/PaymentProcessorType/Delete.php index 49ac762dd3..d5a6c6d5b0 100644 --- a/api/v3/examples/PaymentProcessorType/Delete.php +++ b/api/v3/examples/PaymentProcessorType/Delete.php @@ -7,7 +7,7 @@ */ function payment_processor_type_delete_example() { $params = array( - 'id' => 17, + 'id' => 15, ); try{ @@ -19,7 +19,8 @@ function payment_processor_type_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PaymentToken/Create.php b/api/v3/examples/PaymentToken/Create.php new file mode 100644 index 0000000000..854c185c46 --- /dev/null +++ b/api/v3/examples/PaymentToken/Create.php @@ -0,0 +1,93 @@ + 'fancy-token-xxxx', + 'contact_id' => 3, + 'created_id' => 3, + 'payment_processor_id' => 1, + ); + + try{ + $result = civicrm_api3('PaymentToken', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 payment_token_create_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 1, + 'values' => array( + '1' => array( + 'id' => '1', + 'contact_id' => '3', + 'payment_processor_id' => '1', + 'token' => 'fancy-token-xxxx', + 'created_date' => '2013-07-28 08:49:19', + 'created_id' => '3', + 'expiry_date' => '', + 'email' => '', + 'billing_first_name' => '', + 'billing_middle_name' => '', + 'billing_last_name' => '', + 'masked_account_number' => '', + 'ip_address' => '', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCreatePaymentToken" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/PaymentToken/Delete.php b/api/v3/examples/PaymentToken/Delete.php new file mode 100644 index 0000000000..460d6ad136 --- /dev/null +++ b/api/v3/examples/PaymentToken/Delete.php @@ -0,0 +1,70 @@ + 3, + ); + + try{ + $result = civicrm_api3('PaymentToken', 'delete', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 payment_token_delete_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testDeletePaymentToken" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/PaymentToken/Get.php b/api/v3/examples/PaymentToken/Get.php new file mode 100644 index 0000000000..101c847b40 --- /dev/null +++ b/api/v3/examples/PaymentToken/Get.php @@ -0,0 +1,83 @@ + 'fancy-token-xxxx', + 'contact_id' => 4, + 'created_id' => 4, + 'payment_processor_id' => 2, + ); + + try{ + $result = civicrm_api3('PaymentToken', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 payment_token_get_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 2, + 'values' => array( + '2' => array( + 'id' => '2', + 'contact_id' => '4', + 'payment_processor_id' => '2', + 'token' => 'fancy-token-xxxx', + 'created_date' => '2013-07-28 08:49:19', + 'created_id' => '4', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testGetPaymentToken" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentTokenTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/Pcp/Create.php b/api/v3/examples/Pcp/Create.php new file mode 100644 index 0000000000..d3481c70a9 --- /dev/null +++ b/api/v3/examples/Pcp/Create.php @@ -0,0 +1,93 @@ + 'Pcp title', + 'contact_id' => 1, + 'page_id' => 1, + 'pcp_block_id' => 1, + ); + + try{ + $result = civicrm_api3('Pcp', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 pcp_create_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 1, + 'values' => array( + '1' => array( + 'id' => '1', + 'contact_id' => '1', + 'status_id' => 0, + 'title' => 'Pcp title', + 'intro_text' => '', + 'page_text' => '', + 'donate_link_text' => '', + 'page_id' => '1', + 'page_type' => '', + 'pcp_block_id' => '1', + 'is_thermometer' => '', + 'is_honor_roll' => '', + 'goal_amount' => '', + 'currency' => 'USD', + 'is_active' => '', + 'is_notify' => '', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCreatePcp" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PcpTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/Phone/Create.php b/api/v3/examples/Phone/Create.php index ea022ea735..384cf28e1f 100644 --- a/api/v3/examples/Phone/Create.php +++ b/api/v3/examples/Phone/Create.php @@ -23,7 +23,8 @@ function phone_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Phone/Delete.php b/api/v3/examples/Phone/Delete.php index 363998ab9b..6f4b97e22a 100644 --- a/api/v3/examples/Phone/Delete.php +++ b/api/v3/examples/Phone/Delete.php @@ -19,7 +19,8 @@ function phone_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function phone_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/Phone/Get.php b/api/v3/examples/Phone/Get.php index f22274d9e2..ef1a0794c9 100644 --- a/api/v3/examples/Phone/Get.php +++ b/api/v3/examples/Phone/Get.php @@ -20,7 +20,8 @@ function phone_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Pledge/Create.php b/api/v3/examples/Pledge/Create.php index 6bd0f386de..c138d72251 100644 --- a/api/v3/examples/Pledge/Create.php +++ b/api/v3/examples/Pledge/Create.php @@ -8,9 +8,9 @@ function pledge_create_example() { $params = array( 'contact_id' => 11, - 'pledge_create_date' => '20150222', - 'start_date' => '20150222', - 'scheduled_date' => '20150224', + 'pledge_create_date' => '20170207', + 'start_date' => '20170207', + 'scheduled_date' => '20170209', 'amount' => '100', 'pledge_status_id' => '2', 'pledge_financial_type_id' => '1', @@ -31,7 +31,8 @@ function pledge_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Pledge/Delete.php b/api/v3/examples/Pledge/Delete.php index 02b53fdf62..17e4780458 100644 --- a/api/v3/examples/Pledge/Delete.php +++ b/api/v3/examples/Pledge/Delete.php @@ -19,7 +19,8 @@ function pledge_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Pledge/Get.php b/api/v3/examples/Pledge/Get.php index 0ac2a32645..541ca67466 100644 --- a/api/v3/examples/Pledge/Get.php +++ b/api/v3/examples/Pledge/Get.php @@ -19,7 +19,8 @@ function pledge_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -50,10 +51,11 @@ function pledge_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '1', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2015-02-22 00:00:00', + 'pledge_create_date' => '2017-02-07 00:00:00', + 'pledge_start_date' => '2017-02-07 00:00:00', 'pledge_status' => 'Pending', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2015-02-24 00:00:00', + 'pledge_next_pay_date' => '2017-02-09 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '', 'pledge_financial_type' => 'Donation', diff --git a/api/v3/examples/Pledge/GetFilterHighDate.php b/api/v3/examples/Pledge/GetFilterHighDate.php index 6e52589e8e..64b6b3ce57 100644 --- a/api/v3/examples/Pledge/GetFilterHighDate.php +++ b/api/v3/examples/Pledge/GetFilterHighDate.php @@ -9,7 +9,7 @@ */ function pledge_get_example() { $params = array( - 'pledge_start_date_high' => '20150220231942', + 'pledge_start_date_high' => '20170205024740', ); try{ @@ -21,7 +21,8 @@ function pledge_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -52,10 +53,11 @@ function pledge_get_expectedresult() { 'display_name' => 'Mr. Anthony Anderson II', 'pledge_id' => '2', 'pledge_amount' => '100.00', - 'pledge_create_date' => '2015-02-22 00:00:00', + 'pledge_create_date' => '2017-02-07 00:00:00', + 'pledge_start_date' => '2016-03-04 00:00:00', 'pledge_status' => 'Overdue', 'pledge_total_paid' => '', - 'pledge_next_pay_date' => '2014-03-07 00:00:00', + 'pledge_next_pay_date' => '2016-03-04 00:00:00', 'pledge_next_pay_amount' => '20.00', 'pledge_outstanding_amount' => '20.00', 'pledge_financial_type' => 'Donation', diff --git a/api/v3/examples/PledgePayment/Create.php b/api/v3/examples/PledgePayment/Create.php index 1e8c21e3eb..bfbe8f64fa 100644 --- a/api/v3/examples/PledgePayment/Create.php +++ b/api/v3/examples/PledgePayment/Create.php @@ -23,7 +23,8 @@ function pledge_payment_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PledgePayment/Delete.php b/api/v3/examples/PledgePayment/Delete.php index d54893ba45..3a0faa1372 100644 --- a/api/v3/examples/PledgePayment/Delete.php +++ b/api/v3/examples/PledgePayment/Delete.php @@ -19,7 +19,8 @@ function pledge_payment_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PledgePayment/Get.php b/api/v3/examples/PledgePayment/Get.php index 17f2e27c27..20018f0088 100644 --- a/api/v3/examples/PledgePayment/Get.php +++ b/api/v3/examples/PledgePayment/Get.php @@ -17,7 +17,8 @@ function pledge_payment_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PledgePayment/Update.php b/api/v3/examples/PledgePayment/Update.php index eaa3178cee..202ba48ac8 100644 --- a/api/v3/examples/PledgePayment/Update.php +++ b/api/v3/examples/PledgePayment/Update.php @@ -20,7 +20,8 @@ function pledge_payment_update_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PriceField/Create.php b/api/v3/examples/PriceField/Create.php index 8339479cb3..054a7a65fb 100644 --- a/api/v3/examples/PriceField/Create.php +++ b/api/v3/examples/PriceField/Create.php @@ -24,7 +24,8 @@ function price_field_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PriceField/Delete.php b/api/v3/examples/PriceField/Delete.php index 3d23332a44..2e1f037fff 100644 --- a/api/v3/examples/PriceField/Delete.php +++ b/api/v3/examples/PriceField/Delete.php @@ -19,7 +19,8 @@ function price_field_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PriceField/Get.php b/api/v3/examples/PriceField/Get.php index 953f6d1957..c3da7002da 100644 --- a/api/v3/examples/PriceField/Get.php +++ b/api/v3/examples/PriceField/Get.php @@ -19,7 +19,8 @@ function price_field_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PriceFieldValue/Create.php b/api/v3/examples/PriceFieldValue/Create.php index 567c0b9d06..a833aa785e 100644 --- a/api/v3/examples/PriceFieldValue/Create.php +++ b/api/v3/examples/PriceFieldValue/Create.php @@ -26,7 +26,8 @@ function price_field_value_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -55,6 +56,8 @@ function price_field_value_create_expectedresult() { 'name' => 'memType1', 'label' => 'memType1', 'description' => '', + 'help_pre' => '', + 'help_post' => '', 'amount' => '90', 'count' => '', 'max_value' => '', @@ -64,7 +67,7 @@ function price_field_value_create_expectedresult() { 'is_default' => '', 'is_active' => '1', 'financial_type_id' => '2', - 'deductible_amount' => '', + 'non_deductible_amount' => '', 'contribution_type_id' => '2', ), ), diff --git a/api/v3/examples/PriceFieldValue/Delete.php b/api/v3/examples/PriceFieldValue/Delete.php index 1eb72a66d3..084aac721b 100644 --- a/api/v3/examples/PriceFieldValue/Delete.php +++ b/api/v3/examples/PriceFieldValue/Delete.php @@ -19,7 +19,8 @@ function price_field_value_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function price_field_value_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/PriceFieldValue/Get.php b/api/v3/examples/PriceFieldValue/Get.php index 1944cde832..9443533d1c 100644 --- a/api/v3/examples/PriceFieldValue/Get.php +++ b/api/v3/examples/PriceFieldValue/Get.php @@ -19,7 +19,8 @@ function price_field_value_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -52,7 +53,8 @@ function price_field_value_get_expectedresult() { 'is_default' => 0, 'is_active' => '1', 'financial_type_id' => '1', - 'deductible_amount' => '0.00', + 'non_deductible_amount' => '0.00', + 'contribution_type_id' => '1', ), ), ); diff --git a/api/v3/examples/PriceSet/Create.php b/api/v3/examples/PriceSet/Create.php index 52734d083e..bf801c3eac 100644 --- a/api/v3/examples/PriceSet/Create.php +++ b/api/v3/examples/PriceSet/Create.php @@ -23,7 +23,8 @@ function price_set_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -59,6 +60,7 @@ function price_set_create_expectedresult() { 'financial_type_id' => '', 'is_quick_config' => '', 'is_reserved' => '', + 'min_amount' => '', ), ), ); diff --git a/api/v3/examples/PriceSet/Delete.php b/api/v3/examples/PriceSet/Delete.php index 5360087383..3929b96906 100644 --- a/api/v3/examples/PriceSet/Delete.php +++ b/api/v3/examples/PriceSet/Delete.php @@ -19,7 +19,8 @@ function price_set_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/PriceSet/Get.php b/api/v3/examples/PriceSet/Get.php index b5468e8277..7be052caa0 100644 --- a/api/v3/examples/PriceSet/Get.php +++ b/api/v3/examples/PriceSet/Get.php @@ -19,7 +19,8 @@ function price_set_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -50,6 +51,7 @@ function price_set_get_expectedresult() { 'extends' => '2', 'is_quick_config' => '1', 'is_reserved' => '1', + 'min_amount' => 0, 'entity' => array(), ), ), diff --git a/api/v3/examples/Profile/Apply.php b/api/v3/examples/Profile/Apply.php index 60c8da1e7e..57b867c4d3 100644 --- a/api/v3/examples/Profile/Apply.php +++ b/api/v3/examples/Profile/Apply.php @@ -26,7 +26,8 @@ function profile_apply_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Profile/Get.php b/api/v3/examples/Profile/Get.php index 415ba5cde9..9a34012a83 100644 --- a/api/v3/examples/Profile/Get.php +++ b/api/v3/examples/Profile/Get.php @@ -24,7 +24,8 @@ function profile_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Profile/GetFields.php b/api/v3/examples/Profile/GetFields.php index 81ec33c5c6..48b62cee42 100644 --- a/api/v3/examples/Profile/GetFields.php +++ b/api/v3/examples/Profile/GetFields.php @@ -22,7 +22,8 @@ function profile_getfields_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -63,6 +64,8 @@ function profile_getfields_expectedresult() { 'date_format' => '', 'time_format' => '', 'is_required' => 0, + 'table_name' => 'civicrm_value__addcustomfie_1', + 'column_name' => '_addcustomfieldtoprofile_1', 'name' => 'custom_1', 'title' => 'first_name', 'type' => 2, @@ -77,17 +80,25 @@ function profile_getfields_expectedresult() { 'name' => 'postal_code', 'type' => 2, 'title' => 'State Province', - 'maxlength' => 12, - 'size' => 12, + 'description' => 'Store both US (zip5) AND international postal codes. App is responsible for country/region appropriate validation.', + 'maxlength' => 64, + 'size' => 6, 'import' => TRUE, 'where' => 'civicrm_address.postal_code', 'headerPattern' => '/postal|zip/i', 'dataPattern' => '/\\d?\\d{4}(-\\d{4})?/', 'export' => TRUE, + 'table_name' => 'civicrm_address', + 'entity' => 'address', + 'bao' => 'CRM_Core_BAO_Address', + 'html' => array( + 'type' => 'Text', + 'maxlength' => 64, + 'size' => 6, + ), 'api.required' => 0, 'help_pre' => '', 'help_post' => '', - 'entity' => 'address', 'weight' => '2', 'api.aliases' => array(), ), @@ -95,9 +106,15 @@ function profile_getfields_expectedresult() { 'name' => 'state_province_id', 'type' => 1, 'title' => 'State Province', + 'description' => 'Which State_Province does this address belong to.', + 'table_name' => 'civicrm_address', + 'entity' => 'address', + 'bao' => 'CRM_Core_BAO_Address', 'FKClassName' => 'CRM_Core_DAO_StateProvince', 'html' => array( - 'type' => 'Select', + 'type' => 'ChainSelect', + 'size' => 6, + 'maxlength' => 14, ), 'pseudoconstant' => array( 'table' => 'civicrm_state_province', @@ -108,7 +125,6 @@ function profile_getfields_expectedresult() { 'api.required' => '1', 'help_pre' => '', 'help_post' => '', - 'entity' => 'address', 'weight' => '3', 'api.aliases' => array(), ), @@ -116,9 +132,15 @@ function profile_getfields_expectedresult() { 'name' => 'country_id', 'type' => 1, 'title' => 'Country', + 'description' => 'Which Country does this address belong to.', + 'table_name' => 'civicrm_address', + 'entity' => 'address', + 'bao' => 'CRM_Core_BAO_Address', 'FKClassName' => 'CRM_Core_DAO_Country', 'html' => array( 'type' => 'Select', + 'size' => 6, + 'maxlength' => 14, ), 'pseudoconstant' => array( 'table' => 'civicrm_country', @@ -130,7 +152,6 @@ function profile_getfields_expectedresult() { 'api.required' => '1', 'help_pre' => '', 'help_post' => '', - 'entity' => 'address', 'weight' => '4', 'api.aliases' => array(), ), @@ -138,6 +159,7 @@ function profile_getfields_expectedresult() { 'name' => 'phone', 'type' => 2, 'title' => 'Phone', + 'description' => 'Complete phone number.', 'maxlength' => 32, 'size' => 20, 'import' => TRUE, @@ -145,10 +167,17 @@ function profile_getfields_expectedresult() { 'headerPattern' => '/phone/i', 'dataPattern' => '/^[\\d\\(\\)\\-\\.\\s]+$/', 'export' => TRUE, + 'table_name' => 'civicrm_phone', + 'entity' => 'phone', + 'bao' => 'CRM_Core_BAO_Phone', + 'html' => array( + 'type' => 'Text', + 'maxlength' => 32, + 'size' => 20, + ), 'api.required' => '1', 'help_pre' => '', 'help_post' => '', - 'entity' => 'phone', 'weight' => '5', 'api.aliases' => array(), ), @@ -156,21 +185,26 @@ function profile_getfields_expectedresult() { 'name' => 'email', 'type' => 2, 'title' => 'Email', + 'description' => 'Email address', 'maxlength' => 254, - 'size' => 20, + 'size' => 30, 'import' => TRUE, 'where' => 'civicrm_email.email', 'headerPattern' => '/e.?mail/i', 'dataPattern' => '/^[a-zA-Z][\\w\\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\\w\\.-]*[a-zA-Z0-9]\\.[a-zA-Z][a-zA-Z\\.]*[a-zA-Z]$/', 'export' => TRUE, 'rule' => 'email', + 'table_name' => 'civicrm_email', + 'entity' => 'email', + 'bao' => 'CRM_Core_BAO_Email', 'html' => array( 'type' => 'Text', + 'maxlength' => 254, + 'size' => 30, ), 'api.required' => '1', 'help_pre' => '', 'help_post' => '', - 'entity' => 'email', 'weight' => '6', 'api.aliases' => array( '0' => 'email-Primary', @@ -180,6 +214,7 @@ function profile_getfields_expectedresult() { 'name' => 'last_name', 'type' => 2, 'title' => 'Last Name', + 'description' => 'Last Name.', 'maxlength' => 64, 'size' => 30, 'import' => TRUE, @@ -187,13 +222,17 @@ function profile_getfields_expectedresult() { 'headerPattern' => '/^last|(l(ast\\s)?name)$/i', 'dataPattern' => '/^\\w+(\\s\\w+)?+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', + 'maxlength' => 64, + 'size' => 30, ), 'api.required' => '1', 'help_pre' => '', 'help_post' => '', - 'entity' => 'contact', 'weight' => '7', 'api.aliases' => array(), ), @@ -201,6 +240,7 @@ function profile_getfields_expectedresult() { 'name' => 'first_name', 'type' => 2, 'title' => 'First Name', + 'description' => 'First Name.', 'maxlength' => 64, 'size' => 30, 'import' => TRUE, @@ -208,13 +248,17 @@ function profile_getfields_expectedresult() { 'headerPattern' => '/^first|(f(irst\\s)?name)$/i', 'dataPattern' => '/^\\w+$/', 'export' => TRUE, + 'table_name' => 'civicrm_contact', + 'entity' => 'contact', + 'bao' => 'CRM_Contact_BAO_Contact', 'html' => array( 'type' => 'Text', + 'maxlength' => 64, + 'size' => 30, ), 'api.required' => '1', 'help_pre' => '', 'help_post' => '', - 'entity' => 'contact', 'weight' => '8', 'api.aliases' => array(), ), diff --git a/api/v3/examples/Profile/Submit.php b/api/v3/examples/Profile/Submit.php index 03c6ef75d7..a8b26e325c 100644 --- a/api/v3/examples/Profile/Submit.php +++ b/api/v3/examples/Profile/Submit.php @@ -26,7 +26,8 @@ function profile_submit_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Relationship/BetweenRelationshipType.php b/api/v3/examples/Relationship/BetweenRelationshipType.php index 2a04935a83..d7dfa39ddd 100644 --- a/api/v3/examples/Relationship/BetweenRelationshipType.php +++ b/api/v3/examples/Relationship/BetweenRelationshipType.php @@ -11,8 +11,8 @@ function relationship_get_example() { $params = array( 'relationship_type_id' => array( 'BETWEEN' => array( - '0' => 33, - '1' => 35, + '0' => 36, + '1' => 38, ), ), ); @@ -26,7 +26,8 @@ function relationship_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -50,34 +51,31 @@ function relationship_get_expectedresult() { 'values' => array( '2' => array( 'id' => '2', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '33', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '36', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), '3' => array( 'id' => '3', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '34', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '37', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), '4' => array( 'id' => '4', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '35', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '38', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), diff --git a/api/v3/examples/Relationship/Create.php b/api/v3/examples/Relationship/Create.php index 1c4c1586f1..1978de2bde 100644 --- a/api/v3/examples/Relationship/Create.php +++ b/api/v3/examples/Relationship/Create.php @@ -25,7 +25,8 @@ function relationship_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Relationship/Delete.php b/api/v3/examples/Relationship/Delete.php index 1e8cafd512..74e4ffc302 100644 --- a/api/v3/examples/Relationship/Delete.php +++ b/api/v3/examples/Relationship/Delete.php @@ -19,7 +19,8 @@ function relationship_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Relationship/Get.php b/api/v3/examples/Relationship/Get.php index b1a865ccb1..9d21e1f781 100644 --- a/api/v3/examples/Relationship/Get.php +++ b/api/v3/examples/Relationship/Get.php @@ -19,7 +19,8 @@ function relationship_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -49,7 +50,6 @@ function relationship_get_expectedresult() { 'relationship_type_id' => '22', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, 'custom_1' => 'custom string', diff --git a/api/v3/examples/Relationship/INRelationshipType.php b/api/v3/examples/Relationship/INRelationshipType.php index afbd42c465..3a907c0f1a 100644 --- a/api/v3/examples/Relationship/INRelationshipType.php +++ b/api/v3/examples/Relationship/INRelationshipType.php @@ -11,8 +11,8 @@ function relationship_get_example() { $params = array( 'relationship_type_id' => array( 'IN' => array( - '0' => 33, - '1' => 34, + '0' => 36, + '1' => 37, ), ), ); @@ -26,7 +26,8 @@ function relationship_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -50,23 +51,21 @@ function relationship_get_expectedresult() { 'values' => array( '2' => array( 'id' => '2', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '33', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '36', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), '3' => array( 'id' => '3', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '34', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '37', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), diff --git a/api/v3/examples/Relationship/NotBetweenRelationshipType.php b/api/v3/examples/Relationship/NotBetweenRelationshipType.php index 091ea47cec..31a8a73454 100644 --- a/api/v3/examples/Relationship/NotBetweenRelationshipType.php +++ b/api/v3/examples/Relationship/NotBetweenRelationshipType.php @@ -11,8 +11,8 @@ function relationship_get_example() { $params = array( 'relationship_type_id' => array( 'NOT BETWEEN' => array( - '0' => 33, - '1' => 35, + '0' => 36, + '1' => 38, ), ), ); @@ -26,7 +26,8 @@ function relationship_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -51,12 +52,11 @@ function relationship_get_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '32', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '35', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), diff --git a/api/v3/examples/Relationship/NotInRelationshipType.php b/api/v3/examples/Relationship/NotInRelationshipType.php index 024c3952e8..5e77fe8b30 100644 --- a/api/v3/examples/Relationship/NotInRelationshipType.php +++ b/api/v3/examples/Relationship/NotInRelationshipType.php @@ -11,8 +11,8 @@ function relationship_get_example() { $params = array( 'relationship_type_id' => array( 'NOT IN' => array( - '0' => 33, - '1' => 34, + '0' => 36, + '1' => 37, ), ), ); @@ -26,7 +26,8 @@ function relationship_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -50,23 +51,21 @@ function relationship_get_expectedresult() { 'values' => array( '1' => array( 'id' => '1', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '32', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '35', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), '4' => array( 'id' => '4', - 'contact_id_a' => '87', - 'contact_id_b' => '89', - 'relationship_type_id' => '35', + 'contact_id_a' => '99', + 'contact_id_b' => '101', + 'relationship_type_id' => '38', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), diff --git a/api/v3/examples/Relationship/filterIsCurrent.php b/api/v3/examples/Relationship/filterIsCurrent.php index d12bccc3f9..c4aee7a37a 100644 --- a/api/v3/examples/Relationship/filterIsCurrent.php +++ b/api/v3/examples/Relationship/filterIsCurrent.php @@ -23,7 +23,8 @@ function relationship_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -48,12 +49,11 @@ function relationship_get_expectedresult() { 'values' => array( '2' => array( 'id' => '2', - 'contact_id_a' => '83', - 'contact_id_b' => '85', - 'relationship_type_id' => '31', + 'contact_id_a' => '95', + 'contact_id_b' => '97', + 'relationship_type_id' => '34', 'start_date' => '2013-07-29 00:00:00', 'is_active' => '1', - 'description' => '', 'is_permission_a_b' => 0, 'is_permission_b_a' => 0, ), diff --git a/api/v3/examples/RelationshipType/Create.php b/api/v3/examples/RelationshipType/Create.php index 2d458c4dbf..42826f114c 100644 --- a/api/v3/examples/RelationshipType/Create.php +++ b/api/v3/examples/RelationshipType/Create.php @@ -25,7 +25,8 @@ function relationship_type_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/RelationshipType/Delete.php b/api/v3/examples/RelationshipType/Delete.php index 6b1dd50373..d331378cdc 100644 --- a/api/v3/examples/RelationshipType/Delete.php +++ b/api/v3/examples/RelationshipType/Delete.php @@ -19,7 +19,8 @@ function relationship_type_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function relationship_type_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/ReportTemplate/Getrows.php b/api/v3/examples/ReportTemplate/Getrows.php index 8c790439fd..25dc1d5fc6 100644 --- a/api/v3/examples/ReportTemplate/Getrows.php +++ b/api/v3/examples/ReportTemplate/Getrows.php @@ -27,7 +27,8 @@ function report_template_getrows_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -50,16 +51,16 @@ function report_template_getrows_expectedresult() { 'count' => 2, 'values' => array( '0' => array( - 'civicrm_contact_sort_name' => 'Default Organization', - 'civicrm_contact_id' => '1', - 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=1', - 'civicrm_contact_sort_name_hover' => 'View Constituent Detail Report for this contact.', - ), - '1' => array( 'civicrm_contact_sort_name' => 'Second Domain', 'civicrm_contact_id' => '2', 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=2', - 'civicrm_contact_sort_name_hover' => 'View Constituent Detail Report for this contact.', + 'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact', + ), + '1' => array( + 'civicrm_contact_sort_name' => 'Unit Test Organization', + 'civicrm_contact_id' => '1', + 'civicrm_contact_sort_name_link' => '/index.php?q=civicrm/report/contact/detail&reset=1&force=1&id_op=eq&id_value=1', + 'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact', ), ), 'metadata' => array( diff --git a/api/v3/examples/ReportTemplate/Getstatistics.php b/api/v3/examples/ReportTemplate/Getstatistics.php index bc98a485fe..d9c9dc340c 100644 --- a/api/v3/examples/ReportTemplate/Getstatistics.php +++ b/api/v3/examples/ReportTemplate/Getstatistics.php @@ -9,7 +9,7 @@ */ function report_template_getstatistics_example() { $params = array( - 'report_id' => 'contribute/recursummary', + 'report_id' => 'contribute/deferredrevenue', ); try{ @@ -21,7 +21,8 @@ function report_template_getstatistics_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -41,16 +42,8 @@ function report_template_getstatistics_expectedresult() { $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 1, - 'id' => 'counts', - 'values' => array( - 'counts' => array( - 'rowCount' => array( - 'title' => 'Row(s) Listed', - 'value' => 0, - ), - ), - ), + 'count' => 0, + 'values' => '', ); return $expectedResult; diff --git a/api/v3/examples/SavedSearch/Create.php b/api/v3/examples/SavedSearch/Create.php new file mode 100644 index 0000000000..31d677d93a --- /dev/null +++ b/api/v3/examples/SavedSearch/Create.php @@ -0,0 +1,127 @@ + array( + 'relation_type_id' => '6_a_b', + 'relation_target_name' => 'Default Organization', + ), + 'api.Group.create' => array( + 'name' => 'my_smartgroup', + 'title' => 'my smartgroup', + 'description' => 'Volunteers for the default organization', + 'saved_search_id' => '$value.id', + 'is_active' => 1, + 'visibility' => 'User and User Admin Only', + 'is_hidden' => 0, + 'is_reserved' => 0, + ), + ); + + try{ + $result = civicrm_api3('SavedSearch', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 saved_search_create_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 3, + 'values' => array( + '3' => array( + 'id' => '3', + 'form_values' => array( + 'relation_type_id' => '6_a_b', + 'relation_target_name' => 'Default Organization', + ), + 'mapping_id' => '', + 'search_custom_id' => '', + 'where_clause' => '', + 'select_tables' => '', + 'where_tables' => '', + 'api.Group.create' => array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 1, + 'values' => array( + '0' => array( + 'id' => '1', + 'name' => 'my_smartgroup', + 'title' => 'my smartgroup', + 'description' => 'Volunteers for the default organization', + 'source' => '', + 'saved_search_id' => '3', + 'is_active' => '1', + 'visibility' => 'User and User Admin Only', + 'where_clause' => ' ( ( `civicrm_group_contact_cache_1`.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:31:\"`civicrm_group_contact_cache_1`\";s:132:\" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1` ON contact_a.id = `civicrm_group_contact_cache_1`.contact_id \";}', + 'where_tables' => 'a:2:{s:15:\"civicrm_contact\";i:1;s:31:\"`civicrm_group_contact_cache_1`\";s:132:\" LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_1` ON contact_a.id = `civicrm_group_contact_cache_1`.contact_id \";}', + 'group_type' => '', + 'cache_date' => '', + 'refresh_date' => '', + 'parents' => '', + 'children' => '', + 'is_hidden' => 0, + 'is_reserved' => 0, + 'created_id' => '', + 'modified_id' => '', + ), + ), + ), + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCreateSavedSearchWithSmartGroup" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/SavedSearch/Delete.php b/api/v3/examples/SavedSearch/Delete.php new file mode 100644 index 0000000000..3d0052b6b9 --- /dev/null +++ b/api/v3/examples/SavedSearch/Delete.php @@ -0,0 +1,70 @@ + 4, + ); + + try{ + $result = civicrm_api3('SavedSearch', 'delete', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 saved_search_delete_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testDeleteSavedSearch" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/SavedSearch/Get.php b/api/v3/examples/SavedSearch/Get.php new file mode 100644 index 0000000000..14adb3a11b --- /dev/null +++ b/api/v3/examples/SavedSearch/Get.php @@ -0,0 +1,79 @@ + 2, + ); + + try{ + $result = civicrm_api3('SavedSearch', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 saved_search_get_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 2, + 'values' => array( + '2' => array( + 'id' => '2', + 'form_values' => array( + 'relation_type_id' => '6_a_b', + 'relation_target_name' => 'Default Organization', + ), + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCreateAndGetSavedSearch" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SavedSearchTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/Setting/Create.php b/api/v3/examples/Setting/Create.php index 466890049c..3f92f96137 100644 --- a/api/v3/examples/Setting/Create.php +++ b/api/v3/examples/Setting/Create.php @@ -20,7 +20,8 @@ function setting_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/CreateAllDomains.php b/api/v3/examples/Setting/CreateAllDomains.php index ec21159633..37a4d5efc4 100644 --- a/api/v3/examples/Setting/CreateAllDomains.php +++ b/api/v3/examples/Setting/CreateAllDomains.php @@ -22,7 +22,8 @@ function setting_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/CreateSettingCurrentDomain.php b/api/v3/examples/Setting/CreateSettingCurrentDomain.php index a43b968efc..c0e189dcb2 100644 --- a/api/v3/examples/Setting/CreateSettingCurrentDomain.php +++ b/api/v3/examples/Setting/CreateSettingCurrentDomain.php @@ -21,7 +21,8 @@ function setting_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/CreateSpecifiedDomains.php b/api/v3/examples/Setting/CreateSpecifiedDomains.php index e889f6c3a0..a54f24ab94 100644 --- a/api/v3/examples/Setting/CreateSpecifiedDomains.php +++ b/api/v3/examples/Setting/CreateSpecifiedDomains.php @@ -25,7 +25,8 @@ function setting_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/Get.php b/api/v3/examples/Setting/Get.php index 270c1e5e54..522fb14a8e 100644 --- a/api/v3/examples/Setting/Get.php +++ b/api/v3/examples/Setting/Get.php @@ -20,7 +20,8 @@ function setting_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/GetAllDomains.php b/api/v3/examples/Setting/GetAllDomains.php index 4aab2582fa..3a446f13d8 100644 --- a/api/v3/examples/Setting/GetAllDomains.php +++ b/api/v3/examples/Setting/GetAllDomains.php @@ -22,7 +22,8 @@ function setting_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/GetDefaults.php b/api/v3/examples/Setting/GetDefaults.php index 3cb02ca813..1a5e7d9b2d 100644 --- a/api/v3/examples/Setting/GetDefaults.php +++ b/api/v3/examples/Setting/GetDefaults.php @@ -21,7 +21,8 @@ function setting_getdefaults_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/GetFields.php b/api/v3/examples/Setting/GetFields.php index df623eb6ce..9e6170e70d 100644 --- a/api/v3/examples/Setting/GetFields.php +++ b/api/v3/examples/Setting/GetFields.php @@ -19,7 +19,8 @@ function setting_getfields_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -39,7 +40,7 @@ function setting_getfields_expectedresult() { $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 91, + 'count' => 151, 'values' => array( 'address_standardization_provider' => array( 'group_name' => 'Address Preferences', @@ -84,6 +85,20 @@ function setting_getfields_expectedresult() { 'help_text' => 'Web Service URL', 'validate_callback' => 'CRM_Utils_Rule::url', ), + 'hideCountryMailingLabels' => array( + 'group_name' => 'Address Preferences', + 'group' => 'address', + 'name' => 'hideCountryMailingLabels', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.7', + 'title' => 'Hide Country in Mailing Labels when same as domain country', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Do not display the country field in mailing labels when the country is the same as that of the domain', + 'help_text' => '', + ), 'tag_unconfirmed' => array( 'group_name' => 'Campaign Preferences', 'group' => 'campaign', @@ -126,6 +141,135 @@ function setting_getfields_expectedresult() { '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', ), + 'contribution_invoice_settings' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'contribution_invoice_settings', + 'type' => 'Array', + 'default' => array( + 'invoice_prefix' => 'INV_', + 'credit_notes_prefix' => 'CN_', + 'due_date' => '10', + 'due_date_period' => 'days', + 'notes' => '', + 'tax_term' => 'Sales Tax', + 'tax_display_settings' => 'Inclusive', + ), + 'add' => '4.7', + 'title' => 'Contribution Invoice Settings', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'invoicing' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'invoicing', + 'type' => 'Integer', + 'html_type' => 'checkbox', + 'quick_form_type' => 'Element', + 'default' => 0, + 'add' => '4.7', + 'title' => 'Enable Tax and Invoicing', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'acl_financial_type' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'acl_financial_type', + 'type' => 'Integer', + '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, + 'description' => '', + 'help_text' => '', + ), + 'deferred_revenue_enabled' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'deferred_revenue_enabled', + 'type' => 'Integer', + 'html_type' => 'checkbox', + 'quick_form_type' => 'Element', + 'default' => 0, + 'add' => '4.7', + 'title' => 'Enable Deferred Revenue', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'default_invoice_page' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'default_invoice_page', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'default' => '', + 'pseudoconstant' => array( + 'name' => 'contributionPage', + ), + 'html_type' => 'select', + 'add' => '4.7', + 'title' => 'Default invoice payment page', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'financial_account_bal_enable' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'financial_account_bal_enable', + 'type' => 'Integer', + 'html_type' => 'checkbox', + 'quick_form_type' => 'Element', + 'default' => 0, + 'add' => '4.7', + 'title' => 'Enable Financial Account Balances', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'prior_financial_period' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'prior_financial_period', + 'type' => 'activityDate', + 'quick_form_type' => 'Date', + 'html_type' => 'Date', + 'default' => '', + 'add' => '4.7', + 'title' => 'Prior Financial Period', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'always_post_to_accounts_receivable' => array( + 'group_name' => 'Contribute Preferences', + 'group' => 'contribute', + 'name' => 'always_post_to_accounts_receivable', + 'type' => 'Integer', + 'html_type' => 'checkbox', + 'quick_form_type' => 'Element', + 'default' => 0, + 'add' => '4.7', + 'title' => 'Always post to Accounts Receivable?', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), 'contact_view_options' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', @@ -135,20 +279,7 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => array( 'optionGroupName' => 'contact_view_options', ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '3', - '3' => '4', - '4' => '5', - '5' => '6', - '6' => '7', - '7' => '8', - '8' => '9', - '9' => '10', - '10' => '11', - '11' => '13', - ), + 'default' => '123456789101113', 'add' => '4.1', 'title' => 'Viewing Contacts', 'is_domain' => '1', @@ -165,19 +296,7 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => array( 'optionGroupName' => 'contact_edit_options', ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '3', - '3' => '4', - '4' => '5', - '5' => '6', - '6' => '7', - '7' => '8', - '8' => '9', - '9' => '10', - '10' => '11', - ), + 'default' => '123456789111214151617', 'add' => '4.1', 'title' => 'Editing Contacts', 'is_domain' => 1, @@ -193,25 +312,7 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => array( 'optionGroupName' => 'advanced_search_options', ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '3', - '3' => '4', - '4' => '5', - '5' => '6', - '6' => '7', - '7' => '8', - '8' => '9', - '9' => '10', - '10' => '12', - '11' => '13', - '12' => '15', - '13' => '16', - '14' => '17', - '15' => '18', - '16' => '19', - ), + 'default' => '123456789101112131516171819', 'add' => '4.1', 'title' => 'Contact Search', 'is_domain' => 1, @@ -228,16 +329,7 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => array( 'optionGroupName' => 'user_dashboard_options', ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '3', - '3' => '4', - '4' => '5', - '5' => '7', - '6' => '8', - '7' => '9', - ), + 'default' => '1234578', 'add' => '4.1', 'title' => 'Contact Dashboard', 'is_domain' => 1, @@ -254,16 +346,7 @@ function setting_getfields_expectedresult() { 'pseudoconstant' => array( 'optionGroupName' => 'address_options', ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '4', - '3' => '5', - '4' => '8', - '5' => '9', - '6' => '10', - '7' => '11', - ), + 'default' => '123456891011', 'add' => '4.1', 'title' => 'Addressing Options', 'is_domain' => 1, @@ -337,13 +420,28 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ), + 'remote_profile_submissions' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'remote_profile_submissions', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '', + 'html_type' => 'radio', + 'add' => '4.7', + 'title' => 'Accept profile submissions from external sites', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, CiviCRM will permit submissions from external sites to profiles. This is disabled by default to limit abuse.', + 'help_text' => '', + ), 'editor_id' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'editor_id', 'type' => 'String', - 'html_type' => 'Text', - 'default' => '', + 'html_type' => 'Select', + 'default' => 'CKEditor', 'add' => '4.1', 'title' => 'Wysiwig Editor', 'is_domain' => 1, @@ -357,7 +455,7 @@ function setting_getfields_expectedresult() { 'name' => 'contact_ajax_check_similar', 'type' => 'String', 'html_type' => 'Text', - 'default' => '', + 'default' => '1', 'add' => '4.1', 'title' => 'Ajax Check Similar', 'is_domain' => 1, @@ -385,7 +483,7 @@ function setting_getfields_expectedresult() { 'name' => 'activity_assignee_notification', 'type' => 'String', 'html_type' => 'Text', - 'default' => '', + 'default' => '1', 'add' => '4.1', 'title' => 'Notify Activity Assignees', 'is_domain' => 1, @@ -399,7 +497,7 @@ function setting_getfields_expectedresult() { 'name' => 'activity_assignee_notification_ics', 'type' => 'String', 'html_type' => 'Text', - 'default' => '', + 'default' => 0, 'add' => '4.3', 'title' => 'Include ICal Invite to Activity Assignees', 'is_domain' => 1, @@ -412,24 +510,16 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'contact_autocomplete_options', 'type' => 'String', - 'html_type' => 'checkboxes', + 'quick_form_type' => 'CheckBox', 'pseudoconstant' => array( - 'optionGroupName' => 'contact_autocomplete_options', - ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '3', - '3' => '4', - '4' => '5', - '5' => '6', - '6' => '7', + 'callback' => 'CRM_Admin_Form_Setting_Search::getContactAutocompleteOptions', ), + 'default' => '12', 'add' => '4.1', - 'title' => 'Contact Reference Autocomplete Options', + 'title' => 'Autocomplete Contact Search', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Selected fields will be displayed in back-office autocomplete dropdown search results (Quick Search, etc.). Contact Name is always included.', 'help_text' => '', ), 'contact_reference_options' => array( @@ -437,32 +527,69 @@ function setting_getfields_expectedresult() { 'group' => 'core', 'name' => 'contact_reference_options', 'type' => 'String', - 'html_type' => 'checkboxes', + 'quick_form_type' => 'CheckBox', 'pseudoconstant' => array( - 'optionGroupName' => 'contact_reference_options', - ), - 'default' => array( - '0' => '1', - '1' => '2', - '2' => '3', - '3' => '4', - '4' => '5', - '5' => '6', - '6' => '7', + 'callback' => 'CRM_Admin_Form_Setting_Search::getContactReferenceOptions', ), + 'default' => '12', 'add' => '4.1', 'title' => 'Contact Reference Options', 'is_domain' => 1, 'is_contact' => 0, + 'description' => 'Selected fields will be displayed in autocomplete dropdown search results for \'Contact Reference\' custom fields. Contact Name is always included. NOTE: You must assign \'access contact reference fields\' permission to the anonymous role if you want to use custom contact reference fields in profiles on public pages. For most situations, you should use the \'Limit List to Group\' setting when configuring a contact reference field which will be used in public forms to prevent exposing your entire contact list.', + 'help_text' => '', + ), + 'contact_smart_group_display' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'contact_smart_group_display', + 'type' => 'String', + 'html_type' => 'radio', + 'default' => '1', + 'add' => '4.7', + 'title' => 'Viewing Smart Groups', + 'is_domain' => 1, + 'is_contact' => 0, 'description' => '', 'help_text' => '', ), + 'smart_group_cache_refresh_mode' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'smart_group_cache_refresh_mode', + 'type' => 'String', + 'html_type' => 'radio', + 'default' => 'opportunistic', + 'add' => '4.7', + 'title' => 'Smart Group Refresh Mode', + 'is_domain' => 1, + 'is_contact' => 0, + 'pseudoconstant' => array( + 'callback' => 'CRM_Contact_BAO_GroupContactCache::getModes', + ), + 'description' => 'Should the smart groups be 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.', + ), + 'installed' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'installed', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '', + 'add' => '4.7', + 'title' => 'System Installed', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'A flag indicating whether this system has run a post-installation routine', + 'help_text' => '', + ), 'max_attachments' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'max_attachments', 'legacy_key' => 'maxAttachments', - 'prefetch' => 0, 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'text', @@ -482,8 +609,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'maxFileSize', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'text', @@ -535,21 +660,19 @@ function setting_getfields_expectedresult() { 'quick_form_type' => 'YesNo', 'default' => 1, 'add' => '4.4', - 'title' => 'Security Audits', + 'title' => 'Status Alerts', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If enabled, CiviCRM will automatically run checks for significant mis-configurations such as ineffective file protections.', + 'description' => 'If enabled, CiviCRM will display pop-up notifications (no more than once per day) for security and misconfiguration issues identified in the system check.', 'help_text' => '', ), 'doNotAttachPDFReceipt' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'doNotAttachPDFReceipt', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', - 'default' => 1, + 'default' => 0, 'add' => '4.3', 'title' => 'Attach PDF copy to receipts', 'is_domain' => 1, @@ -561,8 +684,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'wkhtmltopdfPath', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -578,12 +699,29 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ), + 'recaptchaOptions' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'recaptchaOptions', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_attributes' => array( + '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' => '', + ), 'recaptchaPublicKey' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'recaptchaPublicKey', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -603,8 +741,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'recaptchaPrivateKey', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -620,11 +756,10 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ), - 'checksumTimeout' => array( + 'checksum_timeout' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'checksumTimeout', - 'prefetch' => 1, + 'name' => 'checksum_timeout', 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -644,7 +779,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'blogUrl', - 'prefetch' => 0, 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -664,7 +798,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'communityMessagesUrl', - 'prefetch' => 0, 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -680,22 +813,35 @@ function setting_getfields_expectedresult() { 'description' => 'Service providing CiviCRM community messages', 'help_text' => 'Use \"*default*\" for the system default or override with a custom URL', ), - 'resCacheCode' => array( + 'gettingStartedUrl' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', - 'name' => 'resCacheCode', - 'prefetch' => 1, - 'config_only' => 1, + 'name' => 'gettingStartedUrl', 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( - 'size' => 16, - 'maxlength' => 16, + 'size' => 64, + 'maxlength' => 128, ), 'html_type' => 'Text', + 'default' => '*default*', + 'add' => '4.3', + 'title' => 'Getting Started URL', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Service providing the Getting Started data', + 'help_text' => 'Use \"*default*\" for the system default or override with a custom URL', + ), + 'resCacheCode' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'resCacheCode', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', 'default' => '', 'add' => '4.3', - 'title' => 'Resource Cache Code', + 'title' => 'resCacheCode', 'is_domain' => 1, 'is_contact' => 0, 'description' => 'Code appended to resource URLs (JS/CSS) to coerce HTTP caching', @@ -712,9 +858,23 @@ function setting_getfields_expectedresult() { 'title' => 'Verify SSL?', 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'If disabled, backend HTTPS services will allow unverified, insecure connections', + 'description' => 'If disabled, outbound web-service requests will allow unverified, insecure HTTPS connections', 'help_text' => 'Unless you are absolutely unable to configure your server to check the SSL certificate of the remote server you should leave this set to Yes', ), + 'enableSSL' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'enableSSL', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.5', + 'title' => 'Force SSL?', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, inbound HTTP requests for sensitive pages will be redirected to HTTPS.', + 'help_text' => 'If enabled, inbound HTTP requests for sensitive pages will be redirected to HTTPS.', + ), 'wpBasePage' => array( 'group_name' => 'CiviCRM Preferences', 'group' => 'core', @@ -722,7 +882,6 @@ function setting_getfields_expectedresult() { 'type' => 'String', 'html_type' => 'text', 'quick_form_type' => 'Element', - 'prefetch' => 1, 'default' => '', 'add' => '4.3', 'title' => 'WordPress Base Page', @@ -735,7 +894,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'secondDegRelPermissions', - 'prefetch' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 0, @@ -747,6 +905,7 @@ function setting_getfields_expectedresult() { 'help_text' => '', ), 'enable_components' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'enable_components', @@ -758,14 +917,7 @@ function setting_getfields_expectedresult() { 'style' => 'width:150px', 'class' => 'advmultiselect', ), - 'default' => array( - '0' => 'CiviEvent', - '1' => 'CiviContribute', - '2' => 'CiviMember', - '3' => 'CiviMail', - '4' => 'CiviReport', - '5' => 'CiviPledge', - ), + 'default' => '', 'add' => '4.4', 'title' => 'Enable Components', 'is_domain' => '1', @@ -796,7 +948,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'CiviCRM Preferences', 'group' => 'core', 'name' => 'empoweredBy', - 'prefetch' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 1, @@ -807,176 +958,446 @@ function setting_getfields_expectedresult() { 'description' => 'When enabled, \"empowered by CiviCRM\" is displayed at the bottom of public forms.', 'help_text' => '', ), - 'userFrameworkLogging' => array( - 'group_name' => 'Developer Preferences', - 'group' => 'developer', - 'name' => 'userFrameworkLogging', + 'logging_no_trigger_permission' => array( + 'add' => '4.7', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'help_text' => '(EXPERIMENTAL) If the MySQL user does not have permission to administer triggers, then you must create the triggers outside CiviCRM. No support is provided for this configuration.', + 'name' => 'logging_no_trigger_permission', 'type' => 'Boolean', 'quick_form_type' => 'YesNo', + 'html_type' => '', 'default' => 0, - 'add' => '4.3', - 'title' => 'Enable Drupal Watchdog Logging', + 'title' => '(EXPERIMENTAL) MySQL user does not have trigger permissions', + 'description' => 'Set this when you intend to manage trigger creation outside of CiviCRM', + ), + 'logging' => array( + 'add' => '4.7', + 'help_text' => '', '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', - 'prefetch' => 1, - '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' => array( - 'group_name' => 'Developer Preferences', - 'group' => 'developer', - 'name' => 'debug_enabled', - 'config_key' => 'debug', + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'logging', 'type' => 'Boolean', 'quick_form_type' => 'YesNo', + 'html_type' => '', 'default' => 0, - 'add' => '4.3', - 'title' => 'Enable Debugging', + 'title' => 'Logging', + 'description' => 'If enabled, all actions will be logged with a complete record of changes.', + 'validate_callback' => 'CRM_Logging_Schema::checkLoggingSupport', + 'on_change' => array( + '0' => 'CRM_Logging_Schema::onToggle', + ), + ), + 'logging_uniqueid_date' => array( + 'add' => '4.7', + 'help_text' => 'This is the date when CRM-18193 was implemented', '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', - 'prefetch' => 1, - 'help_text' => 'Do not turn this on on production sites', + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'logging_uniqueid_date', + 'type' => 'Date', + 'quick_form_type' => 'DateTime', + 'html_type' => '', + 'default' => '', + 'title' => 'Logging Unique ID not recorded before', + 'description' => 'This is the date when CRM-18193 was implemented', ), - 'backtrace' => array( - 'group_name' => 'Developer Preferences', - 'group' => 'developer', - 'name' => 'backtrace', + 'logging_all_tables_uniquid' => array( + 'add' => '4.7', + 'help_text' => 'This indicates there are no tables holdng pre-uniqid log_conn_id values (CRM-18193)', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'logging_all_tables_uniquid', 'type' => 'Boolean', 'quick_form_type' => 'YesNo', + 'html_type' => '', 'default' => 0, - 'add' => '4.3', - 'title' => 'Display Backtrace', + 'title' => 'All tables use Unique Connection ID', + 'description' => 'Do some tables pre-date CRM-18193?', + ), + 'userFrameworkUsersTableName' => array( + 'add' => '4.7', + 'help_text' => '', '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', - 'prefetch' => 1, - ), - 'fatalErrorHandler' => array( - 'group_name' => 'Developer Preferences', - 'group' => 'developer', - 'name' => 'fatalErrorHandler', + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'userFrameworkUsersTableName', 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '32', + 'maxlength' => '64', + ), 'default' => '', - 'add' => '4.3', + 'title' => 'Drupal Users Table Name', + 'description' => '', + ), + 'wpLoadPhp' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'wpLoadPhp', + 'type' => 'String', + 'html_type' => 'text', + 'quick_form_type' => 'Element', + 'default' => '', + 'add' => '4.6', + 'title' => 'WordPress Path to wp-load.php', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'CiviCRM will use this setting as path to bootstrap WP.', + 'help_text' => '', + ), + 'secure_cache_timeout_minutes' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'secure_cache_timeout_minutes', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 2, + 'maxlength' => 8, + ), + 'default' => 20, + 'add' => '4.7', + 'title' => 'Secure Cache Timeout', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Maximum number of minutes that secure form data should linger', + 'help_text' => '', + ), + 'site_id' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'site_id', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'default' => '', + 'add' => '4.6', + 'title' => 'Unique Site ID', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'systemStatusCheckResult' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'systemStatusCheckResult', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'default' => 0, + 'add' => '4.7', + 'title' => 'systemStatusCheckResult', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'recentItemsMaxCount' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'recentItemsMaxCount', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 2, + 'maxlength' => 3, + ), + 'default' => 20, + 'add' => '4.7', + 'title' => 'Size of \"Recent Items\" stack', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'How many items should CiviCRM store in it\'s \"Recently viewed\" list.', + 'help_text' => '', + ), + 'recentItemsProviders' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'recentItemsProviders', + 'type' => 'Array', + 'html_type' => 'Select', + 'quick_form_type' => 'Select', + 'html_attributes' => array( + 'multiple' => 1, + 'class' => 'crm-select2', + ), + 'default' => '', + 'add' => '4.7', + 'title' => 'Recent Items Providers', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'What providers may save views in CiviCRM\'s \"Recently viewed\" list. If empty, all are in.', + 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Utils_Recent::getProviders', + ), + ), + 'dedupe_default_limit' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'dedupe_default_limit', + 'type' => 'Integer', + 'default' => 0, + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'add' => '4.7', + 'title' => 'Default limit for dedupe screen', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Default to only loading matches against this number of contacts', + 'help_text' => 'Deduping larger databases can crash the server. By configuring a limit other than 0 here the dedupe query will only search for matches against a limited number of contacts.', + ), + 'syncCMSEmail' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'syncCMSEmail', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.7', + 'title' => 'Sync CMS Email', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, then CMS email id will be syncronised with CiviCRM contacts\'s primary email.', + 'help_text' => '', + ), + 'userFrameworkLogging' => array( + 'group_name' => 'Developer Preferences', + 'group' => 'developer', + 'name' => 'userFrameworkLogging', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.3', + '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', + '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' => array( + 'group_name' => 'Developer Preferences', + 'group' => 'developer', + 'name' => 'debug_enabled', + 'config_key' => 'debug', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.3', + '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', + 'help_text' => 'Do not turn this on on production sites', + ), + 'backtrace' => array( + 'group_name' => 'Developer Preferences', + 'group' => 'developer', + 'name' => 'backtrace', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.3', + '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', + ), + 'fatalErrorHandler' => array( + 'group_name' => 'Developer Preferences', + 'group' => 'developer', + 'name' => 'fatalErrorHandler', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'default' => '', + 'add' => '4.3', 'title' => 'Fatal Error Handler', 'is_domain' => 1, 'is_contact' => 0, 'description' => 'Enter the path and class for a custom PHP error-handling function if you want to override built-in CiviCRM error handling for your site.', - 'prefetch' => 1, ), 'uploadDir' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'uploadDir', - 'type' => 'Url', + 'type' => 'String', 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, - 'title' => 'Upload Directory', + 'title' => 'Temporary Files Directory', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', - 'help_text' => '', + 'help_text' => 'File system path where temporary CiviCRM files - such as import data files - are uploaded.', ), 'imageUploadDir' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'imageUploadDir', - 'type' => 'Url', + 'type' => 'String', 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, 'title' => 'Image Directory', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'File system path where image files are uploaded. Currently, this path is used for images associated with premiums (CiviContribute thank-you gifts).', 'help_text' => '', ), 'customFileUploadDir' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'customFileUploadDir', - 'type' => 'Url', + 'type' => 'String', 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, - 'title' => 'Custom Files Upload Directory', + 'title' => 'Custom Files Directory', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Path where documents and images which are attachments to contact records are stored (e.g. contact photos, resumes, contracts, etc.). These attachments are defined using \'file\' type custom fields.', 'help_text' => '', ), 'customTemplateDir' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'customTemplateDir', - 'type' => 'Url', + 'type' => 'String', 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, 'title' => 'Custom Template Directory', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Path where site specific templates are stored if any. This directory is searched first if set. Custom JavaScript code can be added to templates by creating files named templateFile.extra.tpl. (learn more...)', 'help_text' => '', ), 'customPHPPathDir' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'customPHPPathDir', - 'type' => 'Url', + 'type' => 'String', 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, - 'title' => 'Custom PHP Path', + 'title' => 'Custom PHP Directory', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Path where site specific PHP code files are stored if any. This directory is searched first if set.', 'help_text' => '', ), 'extensionsDir' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group_name' => 'Directory Preferences', 'group' => 'directory', 'name' => 'extensionsDir', - 'type' => 'Url', + 'type' => 'String', 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, 'title' => 'Extensions Directory', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', + 'description' => 'Path where CiviCRM extensions are stored.', 'help_text' => '', ), - 'event_enable_cart' => array( + 'enable_cart' => array( 'name' => 'enable_cart', 'group_name' => 'Event Preferences', 'group' => 'event', - 'type' => 'String', + 'type' => 'Boolean', 'quick_form_type' => 'Element', 'default' => 0, 'add' => '4.1', 'title' => 'Enable Event Cart', 'is_domain' => 1, - 'is_contact' => 1, + 'is_contact' => 0, 'description' => 'WRITE ME', 'help_text' => 'WRITE ME', ), + 'show_events' => array( + 'name' => 'show_events', + 'group_name' => 'Event Preferences', + 'group' => 'event', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'default' => 10, + 'add' => '4.5', + 'title' => 'Dashboard entries', + 'html_type' => 'select', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Configure how many events should be shown on the dashboard. This overrides the default value of 10 entries.', + 'help_text' => '', + ), + 'ext_repo_url' => array( + 'group_name' => 'Extension Preferences', + 'group' => 'ext', + 'name' => 'ext_repo_url', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_attributes' => array( + 'size' => 64, + 'maxlength' => 128, + ), + 'html_type' => 'Text', + 'default' => 'https://civicrm.org/extdir/ver={ver}|cms={uf}', + 'add' => '4.3', + 'title' => 'Extension Repo URL', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'customTranslateFunction' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'customTranslateFunction', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '30', + 'maxlength' => '100', + ), + 'default' => '', + 'title' => 'Custom Translate Function', + 'description' => '', + ), 'monetaryThousandSeparator' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'monetaryThousandSeparator', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', @@ -995,8 +1416,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'monetaryDecimalPoint', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', @@ -1015,8 +1434,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'moneyformat', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', @@ -1032,14 +1449,12 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'moneyvalueformat', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', 'quick_form_type' => 'Element', 'html_type' => 'text', 'default' => '%!i', 'add' => '4.3', - 'title' => 'Monetary Amount Display', + 'title' => 'Monetary Value Display', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1049,13 +1464,11 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'defaultCurrency', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', - 'quick_form_type' => 'Element', - 'html_type' => 'text', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', 'html_attributes' => array( - 'size' => 2, + 'class' => 'crm-select2', ), 'default' => 'USD', 'add' => '4.3', @@ -1064,19 +1477,18 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'Default currency assigned to contributions and other monetary transactions.', 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Localization::getCurrencySymbols', + ), ), 'defaultContactCountry' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'defaultContactCountry', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', - 'quick_form_type' => 'Element', - 'html_type' => 'text', - 'html_attributes' => array( - 'size' => 4, - ), + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array(), 'default' => '1228', 'add' => '4.4', 'title' => 'Default Country', @@ -1084,13 +1496,29 @@ function setting_getfields_expectedresult() { 'is_contact' => 0, 'description' => 'This value is selected by default when adding a new contact address.', 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries', + ), + ), + 'defaultContactStateProvince' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'defaultContactStateProvince', + 'type' => 'Integer', + 'quick_form_type' => 'ChainSelect', + 'html_type' => 'ChainSelect', + 'default' => '', + 'title' => 'Default State/Province', + 'description' => 'This value is selected by default when adding a new contact address.', ), 'countryLimit' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'countryLimit', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Array', 'quick_form_type' => 'Element', 'html_type' => 'advmultiselect', @@ -1099,20 +1527,21 @@ function setting_getfields_expectedresult() { 'style' => 'width:150px', 'class' => 'advmultiselect', ), - 'default' => 'null', + 'default' => array(), 'add' => '4.3', 'title' => 'Available Countries', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries', + ), ), 'provinceLimit' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'provinceLimit', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Array', 'quick_form_type' => 'Element', 'html_type' => 'advmultiselect', @@ -1121,20 +1550,21 @@ function setting_getfields_expectedresult() { 'style' => 'width:150px', 'class' => 'advmultiselect', ), - 'default' => 'null', + 'default' => array(), 'add' => '4.3', - 'title' => 'Available States and Provinces', + 'title' => 'Available States and Provinces (by Country)', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Localization::getAvailableCountries', + ), ), 'inheritLocale' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'inheritLocale', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 0, @@ -1149,12 +1579,12 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatDatetime', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', 'default' => '%B %E%f, %Y %l:%M %P', 'add' => '4.3', - 'title' => 'Complete Date and Time', + 'title' => 'Date Format: Complete Date and Time', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1164,12 +1594,12 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatFull', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', 'default' => '%B %E%f, %Y', 'add' => '4.3', - 'title' => 'Complete Date', + 'title' => 'Date Format: Complete Date', 'is_domain' => 1, 'is_contact' => 0, 'description' => '', @@ -1179,31 +1609,272 @@ function setting_getfields_expectedresult() { 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'dateformatPartial', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', 'default' => '%B %Y', 'add' => '4.3', - 'title' => 'Month and Year', + 'title' => 'Date Format: Month and Year', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'dateformatTime' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'dateformatTime', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '12', + 'maxlength' => '60', + ), + 'default' => '%l:%M %P', + 'title' => 'Date Format: Time Only', + 'description' => '', + ), + 'dateformatYear' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'dateformatYear', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '12', + 'maxlength' => '60', + ), + 'default' => '%Y', + 'title' => 'Date Format: Year Only', + 'description' => '', + ), + 'dateformatFinancialBatch' => array( + 'add' => '4.7', + 'help_text' => '', 'is_domain' => 1, 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'dateformatFinancialBatch', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '12', + 'maxlength' => '60', + ), + 'default' => '%m/%d/%Y', + 'title' => 'Date Format: Financial Batch', 'description' => '', + ), + 'dateformatshortdate' => array( + 'add' => '4.7', 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'dateformatshortdate', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '12', + 'maxlength' => '60', + ), + 'default' => '%m/%d/%Y', + 'title' => 'Date Format: Short date Month Day Year', + 'description' => '', + ), + 'dateInputFormat' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'dateInputFormat', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'pseudoconstant' => array( + 'callback' => 'CRM_Core_SelectValues::getDatePluginInputFormats', + ), + 'default' => 'mm/dd/yy', + 'title' => 'Date Input Format', + 'description' => '', + ), + 'fieldSeparator' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'fieldSeparator', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '2', + 'maxlength' => '8', + ), + 'default' => ',', + 'title' => 'Import / Export Field Separator', + 'description' => 'Global CSV separator character. Modify this setting to enable import and export of different kinds of CSV files (for example: \',\' \';\' \':\' \'|\' ).', + ), + 'fiscalYearStart' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'fiscalYearStart', + 'type' => 'Array', + 'quick_form_type' => 'MonthDay', + 'html_type' => 'MonthDay', + 'default' => array( + 'M' => 1, + 'd' => 1, + ), + 'title' => 'Fiscal Year Start', + 'description' => '', + ), + 'languageLimit' => array( + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'languageLimit', + 'type' => 'Array', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array( + 'multiple' => 1, + 'class' => 'crm-select2', + ), + 'default' => '', + 'add' => '4.3', + 'title' => 'Available Languages (Multi-lingual)', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Core_I18n::languages', + ), ), 'lcMessages' => array( 'group_name' => 'Localization Preferences', 'group' => 'localization', 'name' => 'lcMessages', - 'prefetch' => 1, - 'config_only' => 1, 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array( + 'class' => 'crm-select2', + ), 'default' => 'en_US', 'add' => '4.3', 'title' => 'Default Language', 'is_domain' => 1, 'is_contact' => 0, - 'description' => '', - 'help_text' => '', + 'description' => '', + 'help_text' => '', + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLocaleOptions', + ), + 'on_change' => array( + '0' => 'CRM_Admin_Form_Setting_Localization::onChangeLcMessages', + ), + ), + 'legacyEncoding' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'legacyEncoding', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '12', + 'maxlength' => '30', + ), + 'default' => 'Windows-1252', + 'title' => 'Legacy Encoding', + 'description' => 'If import files are NOT encoded as UTF-8, specify an alternate character encoding for these files. The default of Windows-1252 will work for Excel-created .CSV files on many computers.', + ), + 'timeInputFormat' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'timeInputFormat', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'pseudoconstant' => array( + 'callback' => 'CRM_Core_SelectValues::getTimeFormats', + ), + 'default' => '1', + 'title' => 'Time Input Format', + 'description' => '', + 'on_change' => array( + '0' => 'CRM_Core_BAO_PreferencesDate::onChangeSetting', + ), + ), + 'weekBegins' => array( + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'weekBegins', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'pseudoconstant' => array( + 'callback' => 'CRM_Utils_Date::getFullWeekdayNames', + ), + 'default' => 0, + 'add' => '4.7', + 'title' => 'Week begins on', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'contact_default_language' => array( + 'group_name' => 'Localization Preferences', + 'group' => 'localization', + 'name' => 'contact_default_language', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array( + 'class' => 'crm-select2', + ), + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Localization::getDefaultLanguageOptions', + ), + 'default' => '*default*', + 'add' => '4.7', + 'title' => 'Default Language for contacts', + 'is_domain' => 1, + 'is_contact' => 0, + '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', ), 'profile_double_optin' => array( 'group_name' => 'Mailing Preferences', @@ -1211,7 +1882,7 @@ function setting_getfields_expectedresult() { 'name' => 'profile_double_optin', 'type' => 'Integer', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => '1', 'add' => '4.1', 'title' => 'Enable Double Opt-in for Profile Group(s) field', 'is_domain' => 1, @@ -1262,13 +1933,29 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ), + 'replyTo' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'replyTo', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.6', + 'title' => 'Enable Custom Reply-To', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Allow CiviMail users to send mailings with a custom Reply-To header', + 'help_text' => '', + ), 'mailing_backend' => array( 'group_name' => 'Mailing Preferences', 'group' => 'mailing', 'name' => 'mailing_backend', 'type' => 'Array', 'html_type' => 'checkbox', - 'default' => 0, + 'default' => array( + 'outBound_option' => '3', + ), 'add' => '4.1', 'title' => 'Mailing Backend', 'is_domain' => 1, @@ -1332,6 +2019,223 @@ function setting_getfields_expectedresult() { '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' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'civimail_multiple_bulk_emails', + 'type' => 'Integer', + 'html_type' => 'checkbox', + 'default' => 0, + 'add' => '4.5', + 'title' => ' Multiple Bulk Emails', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, CiviMail will deliver a copy of the email to each bulk email listed for the contact.', + 'help_text' => '', + ), + 'include_message_id' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'include_message_id', + 'type' => 'Integer', + 'html_type' => 'checkbox', + 'default' => '', + 'add' => '4.5', + 'title' => 'Enable CiviMail to generate Message-ID header', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'mailerBatchLimit' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'mailerBatchLimit', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 4, + 'maxlength' => 8, + ), + 'default' => 0, + 'add' => '4.7', + 'title' => 'Mailer Batch Limit', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Throttle email delivery by setting the maximum number of emails sent during each CiviMail run (0 = unlimited).', + 'help_text' => '', + ), + 'mailerJobSize' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'mailerJobSize', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 4, + 'maxlength' => 8, + ), + 'default' => 0, + 'add' => '4.7', + 'title' => 'Mailer Job Size', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If you want to utilize multi-threading enter the size you want your sub jobs to be split into. Recommended values are between 1,000 and 10,000. Use a lower value if your server has multiple cron jobs running simultaneously, but do not use values smaller than 1,000. Enter \"0\" to disable multi-threading and process mail as one single job - batch limits still apply.', + 'help_text' => '', + ), + 'mailerJobsMax' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'mailerJobsMax', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 4, + 'maxlength' => 8, + ), + 'default' => 0, + 'add' => '4.7', + '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)', + 'help_text' => '', + ), + 'mailThrottleTime' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'mailThrottleTime', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 4, + 'maxlength' => 8, + ), + 'default' => 0, + 'add' => '4.7', + 'title' => 'Mailer Throttle Time', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'The time to sleep in between each e-mail in micro seconds. Setting this above 0 allows you to control the rate at which e-mail messages are sent to the mail server, avoiding filling up the mail queue very quickly. Set to 0 to disable.', + 'help_text' => '', + ), + 'verpSeparator' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'verpSeparator', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => 4, + 'maxlength' => 32, + ), + 'default' => '.', + 'add' => '4.7', + 'title' => 'VERP Separator', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Separator character used when CiviMail generates VERP (variable envelope return path) Mail-From addresses.', + 'help_text' => '', + ), + 'write_activity_record' => array( + 'group_name' => 'Mailing Preferences', + 'group' => 'mailing', + 'name' => 'write_activity_record', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '1', + 'add' => '4.7', + 'title' => 'Enable CiviMail to create activities on delivery', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => '', + 'help_text' => '', + ), + 'geoAPIKey' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Map Preferences', + 'group' => 'map', + 'name' => 'geoAPIKey', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '32', + 'maxlength' => '64', + ), + 'default' => '', + 'title' => 'Geo Provider Key', + 'description' => 'Enter the API key or Application ID associated with your geocoding provider (not required for Yahoo).', + ), + 'geoProvider' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Map Preferences', + 'group' => 'map', + 'name' => 'geoProvider', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array( + 'class' => 'crm-select2', + ), + 'pseudoconstant' => array( + 'callback' => 'CRM_Core_SelectValues::geoProvider', + ), + 'default' => '', + 'title' => 'Geocoding Provider', + 'description' => 'You may choose a different webservice for geocoding. This is required if there is no geo-coding plugin for your selected mapping provider. You can leave the Geocoding fields blank if you are using Google as your mapping provider.', + ), + 'mapAPIKey' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Map Preferences', + 'group' => 'map', + 'name' => 'mapAPIKey', + 'type' => 'String', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'html_attributes' => array( + 'size' => '32', + 'maxlength' => '64', + ), + 'default' => '', + 'title' => 'Map Provider Key', + 'description' => 'Enter your API Key or Application ID. An API Key is currently optional for Google Maps API, but may be helpful diagnosing any problems and required for higher volumes of requests. Refer to developers.google.com for the latest information.', + ), + 'mapProvider' => array( + 'add' => '4.7', + 'help_text' => '', + 'is_domain' => 1, + 'is_contact' => 0, + 'group_name' => 'Map Preferences', + 'group' => 'map', + 'name' => 'mapProvider', + 'type' => 'String', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array( + 'class' => 'crm-select2', + ), + 'pseudoconstant' => array( + 'callback' => 'CRM_Core_SelectValues::mapProvider', + ), + 'default' => '', + 'title' => 'Mapping Provider', + 'description' => 'Choose the mapping provider that has the best coverage for the majority of your contact addresses.', + ), 'default_renewal_contribution_page' => array( 'group_name' => 'Member Preferences', 'group' => 'member', @@ -1355,7 +2259,7 @@ function setting_getfields_expectedresult() { 'name' => 'is_enabled', 'title' => 'Multisite Is enabled', 'type' => 'Integer', - 'default' => '', + 'default' => 0, 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -1368,7 +2272,7 @@ function setting_getfields_expectedresult() { 'name' => 'domain_group_id', 'title' => 'Multisite Domain Group', 'type' => 'Integer', - 'default' => '', + 'default' => 0, 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -1381,7 +2285,7 @@ function setting_getfields_expectedresult() { 'name' => 'event_price_set_domain_id', 'title' => 'Domain Event Price Set', 'type' => 'Integer', - 'default' => '', + 'default' => 0, 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -1394,7 +2298,7 @@ function setting_getfields_expectedresult() { 'name' => 'uniq_email_per_site', 'type' => 'Integer', 'title' => 'Unique Email per Domain?', - 'default' => '', + 'default' => 0, 'add' => '4.1', 'is_domain' => 1, 'is_contact' => 0, @@ -1405,7 +2309,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'Search Preferences', 'group' => 'Search Preferences', 'name' => 'search_autocomplete_count', - 'prefetch' => 0, 'type' => 'Integer', 'quick_form_type' => 'Element', 'html_type' => 'text', @@ -1425,7 +2328,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'Search Preferences', 'group' => 'Search Preferences', 'name' => 'enable_innodb_fts', - 'prefetch' => 0, 'type' => 'Boolean', 'quick_form_type' => 'YesNo', 'default' => 0, @@ -1446,7 +2348,6 @@ function setting_getfields_expectedresult() { 'group_name' => 'Search Preferences', 'group' => 'Search Preferences', 'name' => 'fts_query_mode', - 'prefetch' => 0, 'type' => 'String', 'quick_form_type' => 'Element', 'html_attributes' => array( @@ -1462,50 +2363,179 @@ function setting_getfields_expectedresult() { 'description' => '', 'help_text' => '', ), + 'includeOrderByClause' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'includeOrderByClause', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.6', + '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', + 'help_text' => '', + ), + 'includeWildCardInName' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'includeWildCardInName', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.6', + 'title' => 'Automatic Wildcard', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, wildcards are automatically added to the beginning AND end of the search term when users search for contacts by Name. EXAMPLE: Searching for \'ada\' will return any contact whose name includes those letters - e.g. \'Adams, Janet\', \'Nadal, Jorge\', etc. If disabled, a wildcard is added to the end of the search term only. EXAMPLE: Searching for \'ada\' will return any contact whose last name begins with those letters - e.g. \'Adams, Janet\' but NOT \'Nadal, Jorge\'. Disabling this feature will speed up search significantly for larger databases, but users must manually enter wildcards (\'%\' or \'_\') to the beginning of the search term if they want to find all records which contain those letters. EXAMPLE: \'%ada\' will return \'Nadal, Jorge\'.', + 'help_text' => '', + ), + 'includeEmailInName' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'includeEmailInName', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.6', + 'title' => 'Include Email', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, email addresses are automatically included when users search by Name. Disabling this feature will speed up search significantly for larger databases, but users will need to use the Email search fields (from Advanced Search, Search Builder, or Profiles) to find contacts by email address.', + 'help_text' => '', + ), + 'includeNickNameInName' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'includeNickNameInName', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 0, + 'add' => '4.6', + 'title' => 'Include Nickname', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If enabled, nicknames are automatically included when users search by Name.', + 'help_text' => '', + ), + 'includeAlphabeticalPager' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'includeAlphabeticalPager', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => 1, + 'add' => '4.6', + 'title' => 'Include Alphabetical Pager', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If disabled, the alphabetical pager will not be displayed on the search screens. This will improve response time on search results on large datasets.', + 'help_text' => '', + ), + 'smartGroupCacheTimeout' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'smartGroupCacheTimeout', + 'type' => 'Integer', + 'quick_form_type' => 'Element', + 'html_type' => 'text', + 'default' => 5, + 'add' => '4.6', + 'title' => 'Smart group cache timeout', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'The number of minutes to cache smart group contacts. We strongly recommend that this value be greater than zero, since a value of zero means no caching at all. If your contact data changes frequently, you should set this value to at least 5 minutes.', + 'help_text' => '', + ), + 'defaultSearchProfileID' => array( + 'group_name' => 'Search Preferences', + 'group' => 'Search Preferences', + 'name' => 'defaultSearchProfileID', + 'type' => 'Integer', + 'quick_form_type' => 'Select', + 'html_type' => 'Select', + 'html_attributes' => array( + 'class' => 'crm-select2', + ), + 'pseudoconstant' => array( + 'callback' => 'CRM_Admin_Form_Setting_Search::getAvailableProfiles', + ), + 'default' => '', + 'add' => '4.6', + 'title' => 'Default Contact Search Profile', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'If set, this will be the default profile used for contact search.', + 'help_text' => '', + ), 'userFrameworkResourceURL' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group' => 'url', 'group_name' => 'URL Preferences', 'name' => 'userFrameworkResourceURL', - 'title' => 'Script and CSS Resources URL', + 'title' => 'CiviCRM Resource URL', 'type' => 'String', + 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'CiviCRM Resource URL', + 'description' => 'Absolute URL of the location where the civicrm module or component has been installed.', 'help_text' => '', - 'validate_callback' => 'CRM_Utils_Rule::url', + 'validate_callback' => 'CRM_Utils_Rule::urlish', ), 'imageUploadURL' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group' => 'url', 'group_name' => 'URL Preferences', - 'title' => 'Image URL Prefix', + 'title' => 'Image Upload URL', 'name' => 'imageUploadURL', 'type' => 'String', + 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Image Upload URL', + 'description' => 'URL of the location for uploaded image files.', 'help_text' => '', - 'validate_callback' => 'CRM_Utils_Rule::url', + 'validate_callback' => 'CRM_Utils_Rule::urlish', ), 'customCSSURL' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', 'group' => 'url', 'group_name' => 'URL Preferences', 'name' => 'customCSSURL', - 'title' => 'Custom CSS', + 'title' => 'Custom CSS URL', 'type' => 'String', + 'html_type' => 'Text', + 'quick_form_type' => 'Element', 'default' => '', 'add' => '4.1', - 'prefetch' => 1, 'is_domain' => 1, 'is_contact' => 0, - 'description' => 'Custom CiviCRM CSS URL', + 'description' => 'You can modify the look and feel of CiviCRM by adding your own stylesheet. For small to medium sized modifications, use your css file to override some of the styles in civicrm.css. Or if you need to make drastic changes, you can choose to disable civicrm.css completely.', 'help_text' => '', - 'validate_callback' => 'CRM_Utils_Rule::url', + 'validate_callback' => 'CRM_Utils_Rule::urlish', + ), + 'extensionsURL' => array( + 'bootstrap_comment' => 'This is a boot setting which may be loaded during bootstrap. Defaults are loaded via SettingsBag::getSystemDefaults().', + 'group' => 'url', + 'group_name' => 'URL Preferences', + 'title' => 'Extension Resource URL', + 'name' => 'extensionsURL', + 'type' => 'String', + 'html_type' => 'Text', + 'quick_form_type' => 'Element', + 'default' => '', + 'add' => '4.1', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Base URL for extension resources (images, stylesheets, etc). This should match extensionsDir.', + 'help_text' => '', + 'validate_callback' => 'CRM_Utils_Rule::urlish', ), ), ); diff --git a/api/v3/examples/Setting/GetSettingCurrentDomain.php b/api/v3/examples/Setting/GetSettingCurrentDomain.php index 5ace770b00..3b46544817 100644 --- a/api/v3/examples/Setting/GetSettingCurrentDomain.php +++ b/api/v3/examples/Setting/GetSettingCurrentDomain.php @@ -21,7 +21,8 @@ function setting_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/GetSpecifiedDomains.php b/api/v3/examples/Setting/GetSpecifiedDomains.php index 683e6618b3..ef6db54e00 100644 --- a/api/v3/examples/Setting/GetSpecifiedDomains.php +++ b/api/v3/examples/Setting/GetSpecifiedDomains.php @@ -27,7 +27,8 @@ function setting_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/GetValue.php b/api/v3/examples/Setting/GetValue.php index 8ee9aa41f2..10991cc435 100644 --- a/api/v3/examples/Setting/GetValue.php +++ b/api/v3/examples/Setting/GetValue.php @@ -22,7 +22,8 @@ function setting_getvalue_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Setting/Revert.php b/api/v3/examples/Setting/Revert.php index 9eb77d993e..40631b92af 100644 --- a/api/v3/examples/Setting/Revert.php +++ b/api/v3/examples/Setting/Revert.php @@ -21,7 +21,8 @@ function setting_revert_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/StateProvince/Create.php b/api/v3/examples/StateProvince/Create.php new file mode 100644 index 0000000000..d8e8e56d0c --- /dev/null +++ b/api/v3/examples/StateProvince/Create.php @@ -0,0 +1,80 @@ + 'Wessex', + 'abbreviation' => 'WEX', + 'country_id' => 1226, + ); + + try{ + $result = civicrm_api3('StateProvince', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 state_province_create_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 13947, + 'values' => array( + '13947' => array( + 'id' => '13947', + 'name' => 'Wessex', + 'abbreviation' => 'WEX', + 'country_id' => '1226', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCreateStateProvince" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/StateProvince/Delete.php b/api/v3/examples/StateProvince/Delete.php new file mode 100644 index 0000000000..6d3d142420 --- /dev/null +++ b/api/v3/examples/StateProvince/Delete.php @@ -0,0 +1,70 @@ + 13948, + ); + + try{ + $result = civicrm_api3('StateProvince', 'delete', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 state_province_delete_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testDeleteStateProvince" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/StateProvince/Get.php b/api/v3/examples/StateProvince/Get.php new file mode 100644 index 0000000000..c4f1ace0fb --- /dev/null +++ b/api/v3/examples/StateProvince/Get.php @@ -0,0 +1,78 @@ + 'Wessex', + ); + + try{ + $result = civicrm_api3('StateProvince', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 state_province_get_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 13949, + 'values' => array( + '13949' => array( + 'id' => '13949', + 'name' => 'Wessex', + 'abbreviation' => 'WEX', + 'country_id' => '1226', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testGet" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StateProvinceTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/StatusPreference/Create.php b/api/v3/examples/StatusPreference/Create.php new file mode 100644 index 0000000000..01ae882c12 --- /dev/null +++ b/api/v3/examples/StatusPreference/Create.php @@ -0,0 +1,85 @@ + 'test_check', + 'domain_id' => 1, + 'hush_until' => '20151212', + 'ignore_severity' => 'cRItical', + 'check_info' => '', + ); + + try{ + $result = civicrm_api3('StatusPreference', 'create', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 status_preference_create_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 4, + 'values' => array( + '4' => array( + 'id' => '4', + 'domain_id' => '1', + 'name' => 'test_check', + 'hush_until' => '20151212000000', + 'ignore_severity' => '5', + 'prefs' => '', + 'check_info' => '', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testCreateSeverityByName" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/StatusPreference/Delete.php b/api/v3/examples/StatusPreference/Delete.php new file mode 100644 index 0000000000..8c3d75f677 --- /dev/null +++ b/api/v3/examples/StatusPreference/Delete.php @@ -0,0 +1,70 @@ + 2, + ); + + try{ + $result = civicrm_api3('StatusPreference', 'delete', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 status_preference_delete_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'values' => 1, + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testDeleteStatusPreference" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/StatusPreference/Get.php b/api/v3/examples/StatusPreference/Get.php new file mode 100644 index 0000000000..b1334a9cae --- /dev/null +++ b/api/v3/examples/StatusPreference/Get.php @@ -0,0 +1,79 @@ + 3, + ); + + try{ + $result = civicrm_api3('StatusPreference', 'get', $params); + } + catch (CiviCRM_API3_Exception $e) { + // Handle error here. + $errorMessage = $e->getMessage(); + $errorCode = $e->getErrorCode(); + $errorData = $e->getExtraParams(); + return array( + '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 status_preference_get_expectedresult() { + + $expectedResult = array( + 'is_error' => 0, + 'version' => 3, + 'count' => 1, + 'id' => 3, + 'values' => array( + '3' => array( + 'id' => '3', + 'domain_id' => '1', + 'name' => 'test_check', + 'hush_until' => '2015-12-12', + 'ignore_severity' => '4', + ), + ), + ); + + return $expectedResult; +} + +/* +* This example has been generated from the API test suite. +* The test that created it is called "testStatusPreferenceGet" +* and can be found at: +* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/StatusPreferenceTest.php +* +* You can see the outcome of the API tests at +* https://test.civicrm.org/job/CiviCRM-master-git/ +* +* To Learn about the API read +* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API +* +* Browse the api on your own site with the api explorer +* http://MYSITE.ORG/path/to/civicrm/api +* +* Read more about testing here +* http://wiki.civicrm.org/confluence/display/CRM/Testing +* +* API Standards documentation: +* http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards +*/ diff --git a/api/v3/examples/Survey/ChainedGetDelete.php b/api/v3/examples/Survey/ChainedGetDelete.php index 2a218305a4..860366008b 100644 --- a/api/v3/examples/Survey/ChainedGetDelete.php +++ b/api/v3/examples/Survey/ChainedGetDelete.php @@ -22,7 +22,8 @@ function survey_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -60,7 +61,7 @@ function survey_get_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ), ), ), diff --git a/api/v3/examples/Survey/Create.php b/api/v3/examples/Survey/Create.php index 11a8482914..09a7387251 100644 --- a/api/v3/examples/Survey/Create.php +++ b/api/v3/examples/Survey/Create.php @@ -22,7 +22,8 @@ function survey_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Survey/Delete.php b/api/v3/examples/Survey/Delete.php index b2b7f6d1a6..2a15ecb7be 100644 --- a/api/v3/examples/Survey/Delete.php +++ b/api/v3/examples/Survey/Delete.php @@ -19,7 +19,8 @@ function survey_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function survey_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/Survey/Get.php b/api/v3/examples/Survey/Get.php index 43038c1830..f1c14e1b44 100644 --- a/api/v3/examples/Survey/Get.php +++ b/api/v3/examples/Survey/Get.php @@ -22,7 +22,8 @@ function survey_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/SurveyRespondant/Get.php b/api/v3/examples/SurveyRespondant/Get.php index b07f6a770f..93614aacf4 100644 --- a/api/v3/examples/SurveyRespondant/Get.php +++ b/api/v3/examples/SurveyRespondant/Get.php @@ -23,7 +23,8 @@ function survey_respondant_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/System/Flush.php b/api/v3/examples/System/Flush.php index 0d124c2144..dab2f325a4 100644 --- a/api/v3/examples/System/Flush.php +++ b/api/v3/examples/System/Flush.php @@ -19,7 +19,8 @@ function system_flush_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Tag/Create.php b/api/v3/examples/Tag/Create.php index 503eacabdb..3add021f74 100644 --- a/api/v3/examples/Tag/Create.php +++ b/api/v3/examples/Tag/Create.php @@ -20,7 +20,8 @@ function tag_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -53,6 +54,7 @@ function tag_create_expectedresult() { 'is_tagset' => '', 'used_for' => 'civicrm_contact', 'created_id' => '', + 'color' => '', 'created_date' => '2013-07-28 08:49:19', ), ), diff --git a/api/v3/examples/Tag/Delete.php b/api/v3/examples/Tag/Delete.php index b1112ad56b..75f072716a 100644 --- a/api/v3/examples/Tag/Delete.php +++ b/api/v3/examples/Tag/Delete.php @@ -19,7 +19,8 @@ function tag_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function tag_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/Tag/Get.php b/api/v3/examples/Tag/Get.php index 8860a11c72..a39d5c6a8e 100644 --- a/api/v3/examples/Tag/Get.php +++ b/api/v3/examples/Tag/Get.php @@ -20,7 +20,8 @@ function tag_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Tag/GetFields.php b/api/v3/examples/Tag/GetFields.php index eb38f18192..c00491e909 100644 --- a/api/v3/examples/Tag/GetFields.php +++ b/api/v3/examples/Tag/GetFields.php @@ -21,7 +21,8 @@ function tag_getfields_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -41,13 +42,17 @@ function tag_getfields_expectedresult() { $expectedResult = array( 'is_error' => 0, 'version' => 3, - 'count' => 10, + 'count' => 11, 'values' => array( 'id' => array( 'name' => 'id', 'type' => 1, 'title' => 'Tag ID', + 'description' => 'Tag ID', 'required' => TRUE, + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', 'api.aliases' => array( '0' => 'tag', ), @@ -56,23 +61,35 @@ function tag_getfields_expectedresult() { 'name' => 'name', 'type' => 2, 'title' => 'Tag Name', + 'description' => 'Name of Tag.', 'required' => TRUE, 'maxlength' => 64, 'size' => 30, + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', 'api.required' => 1, ), 'description' => array( 'name' => 'description', 'type' => 2, 'title' => 'Description', + 'description' => 'Optional verbose description of the tag.', 'maxlength' => 255, 'size' => 45, + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', ), 'parent_id' => array( 'name' => 'parent_id', 'type' => 1, 'title' => 'Parent Tag', + 'description' => 'Optional parent id for this tag.', 'default' => 'NULL', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', 'FKClassName' => 'CRM_Core_DAO_Tag', 'FKApiName' => 'Tag', ), @@ -80,17 +97,27 @@ function tag_getfields_expectedresult() { 'name' => 'is_selectable', 'type' => 16, 'title' => 'Display Tag?', + 'description' => 'Is this tag selectable / displayed', 'default' => '1', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', ), 'is_reserved' => array( 'name' => 'is_reserved', 'type' => 16, 'title' => 'Reserved', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', ), 'is_tagset' => array( 'name' => 'is_tagset', 'type' => 16, 'title' => 'Tagset', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', ), 'used_for' => array( 'name' => 'used_for', @@ -99,11 +126,17 @@ function tag_getfields_expectedresult() { 'maxlength' => 64, 'size' => 30, 'default' => 'NULL', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', 'html' => array( 'type' => 'Select', + 'maxlength' => 64, + 'size' => 30, ), 'pseudoconstant' => array( 'optionGroupName' => 'tag_used_for', + 'optionEditPath' => 'civicrm/admin/options/tag_used_for', ), 'api.default' => 'civicrm_contact', ), @@ -111,13 +144,33 @@ function tag_getfields_expectedresult() { 'name' => 'created_id', 'type' => 1, 'title' => 'Tag Created By', + 'description' => 'FK to civicrm_contact, who created this tag', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'FKApiName' => 'Contact', ), + 'color' => array( + 'name' => 'color', + 'type' => 2, + 'title' => 'Color', + 'description' => 'Hex color value e.g. #ffffff', + 'maxlength' => 255, + 'size' => 45, + 'default' => 'NULL', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', + ), 'created_date' => array( 'name' => 'created_date', 'type' => 12, 'title' => 'Tag Created Date', + 'description' => 'Date and time that tag was created.', + 'table_name' => 'civicrm_tag', + 'entity' => 'Tag', + 'bao' => 'CRM_Core_BAO_Tag', ), ), ); diff --git a/api/v3/examples/Tag/GetList.php b/api/v3/examples/Tag/GetList.php index 9dd6c6ebc8..08db458290 100644 --- a/api/v3/examples/Tag/GetList.php +++ b/api/v3/examples/Tag/GetList.php @@ -24,7 +24,8 @@ function tag_getlist_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Tag/GetReturnArray.php b/api/v3/examples/Tag/GetReturnArray.php index e3cb5b396b..ae5465dce7 100644 --- a/api/v3/examples/Tag/GetReturnArray.php +++ b/api/v3/examples/Tag/GetReturnArray.php @@ -25,7 +25,8 @@ function tag_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/UFField/Create.php b/api/v3/examples/UFField/Create.php index ec39ee0013..6710ce7375 100644 --- a/api/v3/examples/UFField/Create.php +++ b/api/v3/examples/UFField/Create.php @@ -28,7 +28,8 @@ function uf_field_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/UFField/Delete.php b/api/v3/examples/UFField/Delete.php index a766ac7584..996cb148ee 100644 --- a/api/v3/examples/UFField/Delete.php +++ b/api/v3/examples/UFField/Delete.php @@ -19,7 +19,8 @@ function uf_field_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/UFField/Get.php b/api/v3/examples/UFField/Get.php index 9c52c59d20..c6c1a6b2df 100644 --- a/api/v3/examples/UFField/Get.php +++ b/api/v3/examples/UFField/Get.php @@ -17,7 +17,8 @@ function uf_field_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/UFField/Replace.php b/api/v3/examples/UFField/Replace.php index f94ad49347..992d678986 100644 --- a/api/v3/examples/UFField/Replace.php +++ b/api/v3/examples/UFField/Replace.php @@ -53,7 +53,8 @@ function uf_field_replace_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/UFGroup/Create.php b/api/v3/examples/UFGroup/Create.php index fdf7ada935..ade13f1fbe 100644 --- a/api/v3/examples/UFGroup/Create.php +++ b/api/v3/examples/UFGroup/Create.php @@ -38,7 +38,8 @@ function uf_group_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -81,7 +82,7 @@ function uf_group_create_expectedresult() { 'is_cms_user' => '1', 'notify' => 'admin@example.org', 'is_reserved' => '1', - 'name' => 'Test_Group_2', + 'name' => 'Test_Group', 'created_id' => '1', 'created_date' => '2013-07-28 08:49:19', 'is_proximity_search' => '', diff --git a/api/v3/examples/UFGroup/Delete.php b/api/v3/examples/UFGroup/Delete.php index c2be5ea330..68855a931e 100644 --- a/api/v3/examples/UFGroup/Delete.php +++ b/api/v3/examples/UFGroup/Delete.php @@ -19,7 +19,8 @@ function uf_group_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -40,7 +41,7 @@ function uf_group_delete_expectedresult() { 'is_error' => 0, 'version' => 3, 'count' => 1, - 'values' => TRUE, + 'values' => 1, ); return $expectedResult; diff --git a/api/v3/examples/UFGroup/Get.php b/api/v3/examples/UFGroup/Get.php index b35be5d2ba..1ce438b38b 100644 --- a/api/v3/examples/UFGroup/Get.php +++ b/api/v3/examples/UFGroup/Get.php @@ -19,7 +19,8 @@ function uf_group_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -61,7 +62,7 @@ function uf_group_get_expectedresult() { 'is_cms_user' => '1', 'notify' => 'admin@example.org', 'is_reserved' => '1', - 'name' => 'Test_Group_2', + 'name' => 'Test_Group', 'created_id' => '1', 'created_date' => '2013-07-28 08:49:19', 'is_proximity_search' => 0, diff --git a/api/v3/examples/UFJoin/Create.php b/api/v3/examples/UFJoin/Create.php index fa380d97d2..45eb69fec1 100644 --- a/api/v3/examples/UFJoin/Create.php +++ b/api/v3/examples/UFJoin/Create.php @@ -7,8 +7,8 @@ */ function uf_join_create_example() { $params = array( - 'module' => 'CiviContribute', - 'entity_table' => 'civicrm_contribution_page', + 'module' => 'CiviCampaign', + 'entity_table' => 'civicrm_survey', 'entity_id' => 1, 'weight' => 1, 'uf_group_id' => 11, @@ -25,7 +25,8 @@ function uf_join_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -51,8 +52,8 @@ function uf_join_create_expectedresult() { '0' => array( 'id' => '1', 'is_active' => '1', - 'module' => 'CiviContribute', - 'entity_table' => 'civicrm_contribution_page', + 'module' => 'CiviCampaign', + 'entity_table' => 'civicrm_survey', 'entity_id' => '1', 'weight' => '1', 'uf_group_id' => '11', @@ -66,7 +67,7 @@ function uf_join_create_expectedresult() { /* * This example has been generated from the API test suite. -* The test that created it is called "testCreateUFJoin" +* The test that created it is called "testCreateSurveyUFJoin" * and can be found at: * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/UFJoinTest.php * diff --git a/api/v3/examples/UFJoin/Get.php b/api/v3/examples/UFJoin/Get.php index 1328f59812..6f38609a02 100644 --- a/api/v3/examples/UFJoin/Get.php +++ b/api/v3/examples/UFJoin/Get.php @@ -21,7 +21,8 @@ function uf_join_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/UFMatch/Get.php b/api/v3/examples/UFMatch/Get.php index de24f6be46..dddd476237 100644 --- a/api/v3/examples/UFMatch/Get.php +++ b/api/v3/examples/UFMatch/Get.php @@ -19,7 +19,8 @@ function uf_match_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Website/Create.php b/api/v3/examples/Website/Create.php index 89a347ffbd..1e1d4e10fa 100644 --- a/api/v3/examples/Website/Create.php +++ b/api/v3/examples/Website/Create.php @@ -21,7 +21,8 @@ function website_create_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Website/Delete.php b/api/v3/examples/Website/Delete.php index fea28bf164..e40f33ac4b 100644 --- a/api/v3/examples/Website/Delete.php +++ b/api/v3/examples/Website/Delete.php @@ -19,7 +19,8 @@ function website_delete_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Website/Get.php b/api/v3/examples/Website/Get.php index 4b26815ce9..7547491227 100644 --- a/api/v3/examples/Website/Get.php +++ b/api/v3/examples/Website/Get.php @@ -21,7 +21,8 @@ function website_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); diff --git a/api/v3/examples/Website/GetFields.php b/api/v3/examples/Website/GetFields.php index 915c3c238a..1f163d8dc5 100644 --- a/api/v3/examples/Website/GetFields.php +++ b/api/v3/examples/Website/GetFields.php @@ -19,7 +19,8 @@ function website_getfields_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -45,7 +46,11 @@ function website_getfields_expectedresult() { 'name' => 'id', 'type' => 1, 'title' => 'Website ID', + 'description' => 'Unique Website ID', 'required' => TRUE, + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'api.aliases' => array( '0' => 'website_id', ), @@ -54,6 +59,10 @@ function website_getfields_expectedresult() { 'name' => 'contact_id', 'type' => 1, 'title' => 'Contact', + 'description' => 'FK to Contact ID', + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'FKApiName' => 'Contact', ), @@ -61,6 +70,7 @@ function website_getfields_expectedresult() { 'name' => 'url', 'type' => 2, 'title' => 'Website', + 'description' => 'Website', 'maxlength' => 128, 'size' => 30, 'import' => TRUE, @@ -68,19 +78,31 @@ function website_getfields_expectedresult() { 'headerPattern' => '/Website/i', 'dataPattern' => '/^[A-Za-z][0-9A-Za-z]{20,}$/', 'export' => TRUE, + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'html' => array( 'type' => 'Text', + 'maxlength' => 128, + 'size' => 30, ), ), 'website_type_id' => array( 'name' => 'website_type_id', 'type' => 1, 'title' => 'Website Type', + 'description' => 'Which Website type does this website belong to.', + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'html' => array( 'type' => 'Select', + 'size' => 6, + 'maxlength' => 14, ), 'pseudoconstant' => array( 'optionGroupName' => 'website_type', + 'optionEditPath' => 'civicrm/admin/options/website_type', ), ), ), diff --git a/api/v3/examples/Website/GetWithMetadata.php b/api/v3/examples/Website/GetWithMetadata.php index db2e42874c..24c4467ddd 100644 --- a/api/v3/examples/Website/GetWithMetadata.php +++ b/api/v3/examples/Website/GetWithMetadata.php @@ -25,7 +25,8 @@ function website_get_example() { $errorCode = $e->getErrorCode(); $errorData = $e->getExtraParams(); return array( - 'error' => $errorMessage, + 'is_error' => 1, + 'error_message' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData, ); @@ -53,7 +54,11 @@ function website_get_expectedresult() { 'name' => 'id', 'type' => '1', 'title' => 'Website ID', + 'description' => 'Unique Website ID', 'required' => '1', + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'api.aliases' => array( '0' => 'website_id', ), @@ -62,6 +67,10 @@ function website_get_expectedresult() { 'name' => 'contact_id', 'type' => '1', 'title' => 'Contact', + 'description' => 'FK to Contact ID', + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'FKClassName' => 'CRM_Contact_DAO_Contact', 'FKApiName' => 'Contact', ), @@ -69,6 +78,7 @@ function website_get_expectedresult() { 'name' => 'url', 'type' => '2', 'title' => 'Website', + 'description' => 'Website', 'maxlength' => '128', 'size' => '30', 'import' => '1', @@ -76,19 +86,31 @@ function website_get_expectedresult() { 'headerPattern' => '/Website/i', 'dataPattern' => '/^[A-Za-z][0-9A-Za-z]{20,}$/', 'export' => '1', + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'html' => array( 'type' => 'Text', + 'maxlength' => '128', + 'size' => '30', ), ), 'website_type_id' => array( 'name' => 'website_type_id', 'type' => '1', 'title' => 'Website Type', + 'description' => 'Which Website type does this website belong to.', + 'table_name' => 'civicrm_website', + 'entity' => 'Website', + 'bao' => 'CRM_Core_BAO_Website', 'html' => array( 'type' => 'Select', + 'size' => '6', + 'maxlength' => '14', ), 'pseudoconstant' => array( 'optionGroupName' => 'website_type', + 'optionEditPath' => 'civicrm/admin/options/website_type', ), ), ), -- 2.25.1