Update Test generated examples
authoreileen <emcnaughton@wikimedia.org>
Tue, 7 Feb 2017 00:55:46 +0000 (13:55 +1300)
committereileen <emcnaughton@wikimedia.org>
Tue, 7 Feb 2017 02:54:15 +0000 (15:54 +1300)
m

174 files changed:
api/v3/examples/Activity/ContactRefCustomField.php
api/v3/examples/Activity/ContactRefCustomFieldGet.php
api/v3/examples/Activity/Create.php
api/v3/examples/Activity/DateTimeHigh.php
api/v3/examples/Activity/DateTimeLow.php
api/v3/examples/Activity/Get.php
api/v3/examples/Activity/GetFields.php
api/v3/examples/Activity/GetTargetandAssigneeName.php
api/v3/examples/Activity/ReturnAssigneeContact.php
api/v3/examples/ActivityType/Create.php
api/v3/examples/ActivityType/Get.php
api/v3/examples/Constant/Get.php
api/v3/examples/Contact/APIChainedArray.php
api/v3/examples/Contact/APIChainedArrayFormats.php
api/v3/examples/Contact/APIChainedArrayMultipleCustom.php
api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php
api/v3/examples/Contact/ChainTwoWebsites.php
api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php
api/v3/examples/Contact/Create.php
api/v3/examples/Contact/CreateParticipantPayment.php
api/v3/examples/Contact/CustomFieldGet.php
api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php
api/v3/examples/Contact/Delete.php
api/v3/examples/Contact/Get.php
api/v3/examples/Contact/GetFieldsOptions.php
api/v3/examples/Contact/GroupFilterUsingContactAPI.php
api/v3/examples/Contribution/ContributionCreateWithHonoreeContact.php
api/v3/examples/Contribution/ContributionCreateWithNote.php
api/v3/examples/Contribution/ContributionCreateWithSoftCredit.php
api/v3/examples/Contribution/ContributionCreateWithSoftCreditDefaults.php
api/v3/examples/Contribution/Create.php
api/v3/examples/Contribution/CreateWithNestedLineItems.php
api/v3/examples/Contribution/Delete.php
api/v3/examples/Contribution/Get.php
api/v3/examples/ContributionPage/Create.php
api/v3/examples/ContributionPage/Get.php
api/v3/examples/ContributionPage/Submit.php
api/v3/examples/ContributionRecur/Delete.php
api/v3/examples/Country/Create.php
api/v3/examples/Country/Delete.php
api/v3/examples/Country/Get.php
api/v3/examples/EntityTag/Delete.php
api/v3/examples/EntityTag/Get.php
api/v3/examples/Event/IsFullOption.php
api/v3/examples/Group/GetFields.php
api/v3/examples/Job/Create.php
api/v3/examples/Job/Delete.php
api/v3/examples/Logging/Get.php
api/v3/examples/Logging/Revert.php
api/v3/examples/Mailing/Create.php
api/v3/examples/Mailing/Delete.php
api/v3/examples/Mailing/Submit.php
api/v3/examples/MailingAB/Create.php
api/v3/examples/Membership/Create.php
api/v3/examples/Membership/CreateWithCustomData.php
api/v3/examples/Membership/FilterIsCurrent.php
api/v3/examples/Membership/Get.php
api/v3/examples/Membership/UpdateCustomData.php
api/v3/examples/MembershipType/Create.php
api/v3/examples/MembershipType/Get.php
api/v3/examples/MessageTemplate/Create.php
api/v3/examples/MessageTemplate/Delete.php
api/v3/examples/MessageTemplate/Get.php
api/v3/examples/OptionGroup/Create.php
api/v3/examples/OptionGroup/Delete.php
api/v3/examples/Order/Cancel.php
api/v3/examples/Order/Create.php
api/v3/examples/Order/CreateOrderParticipant.php
api/v3/examples/Order/Get.php
api/v3/examples/Participant/Create.php
api/v3/examples/Participant/Get.php
api/v3/examples/Participant/NestedDelete.php
api/v3/examples/Participant/NestedEventGet.php
api/v3/examples/ParticipantStatusType/Create.php
api/v3/examples/ParticipantStatusType/Delete.php
api/v3/examples/ParticipantStatusType/Get.php
api/v3/examples/Payment/Cancel.php
api/v3/examples/Payment/Create.php
api/v3/examples/Payment/CreatePaymentWithLineItems.php
api/v3/examples/Payment/Delete.php
api/v3/examples/Payment/Get.php
api/v3/examples/Payment/UpdatePayment.php
api/v3/examples/PaymentProcessor/Create.php
api/v3/examples/PaymentProcessor/Delete.php
api/v3/examples/PaymentProcessorType/Create.php
api/v3/examples/PaymentProcessorType/Delete.php
api/v3/examples/PaymentToken/Create.php [new file with mode: 0644]
api/v3/examples/PaymentToken/Delete.php [new file with mode: 0644]
api/v3/examples/PaymentToken/Get.php [new file with mode: 0644]
api/v3/examples/Pcp/Create.php [new file with mode: 0644]
api/v3/examples/Phone/Create.php
api/v3/examples/Phone/Delete.php
api/v3/examples/Phone/Get.php
api/v3/examples/Pledge/Create.php
api/v3/examples/Pledge/Delete.php
api/v3/examples/Pledge/Get.php
api/v3/examples/Pledge/GetFilterHighDate.php
api/v3/examples/PledgePayment/Create.php
api/v3/examples/PledgePayment/Delete.php
api/v3/examples/PledgePayment/Get.php
api/v3/examples/PledgePayment/Update.php
api/v3/examples/PriceField/Create.php
api/v3/examples/PriceField/Delete.php
api/v3/examples/PriceField/Get.php
api/v3/examples/PriceFieldValue/Create.php
api/v3/examples/PriceFieldValue/Delete.php
api/v3/examples/PriceFieldValue/Get.php
api/v3/examples/PriceSet/Create.php
api/v3/examples/PriceSet/Delete.php
api/v3/examples/PriceSet/Get.php
api/v3/examples/Profile/Apply.php
api/v3/examples/Profile/Get.php
api/v3/examples/Profile/GetFields.php
api/v3/examples/Profile/Submit.php
api/v3/examples/Relationship/BetweenRelationshipType.php
api/v3/examples/Relationship/Create.php
api/v3/examples/Relationship/Delete.php
api/v3/examples/Relationship/Get.php
api/v3/examples/Relationship/INRelationshipType.php
api/v3/examples/Relationship/NotBetweenRelationshipType.php
api/v3/examples/Relationship/NotInRelationshipType.php
api/v3/examples/Relationship/filterIsCurrent.php
api/v3/examples/RelationshipType/Create.php
api/v3/examples/RelationshipType/Delete.php
api/v3/examples/ReportTemplate/Getrows.php
api/v3/examples/ReportTemplate/Getstatistics.php
api/v3/examples/SavedSearch/Create.php [new file with mode: 0644]
api/v3/examples/SavedSearch/Delete.php [new file with mode: 0644]
api/v3/examples/SavedSearch/Get.php [new file with mode: 0644]
api/v3/examples/Setting/Create.php
api/v3/examples/Setting/CreateAllDomains.php
api/v3/examples/Setting/CreateSettingCurrentDomain.php
api/v3/examples/Setting/CreateSpecifiedDomains.php
api/v3/examples/Setting/Get.php
api/v3/examples/Setting/GetAllDomains.php
api/v3/examples/Setting/GetDefaults.php
api/v3/examples/Setting/GetFields.php
api/v3/examples/Setting/GetSettingCurrentDomain.php
api/v3/examples/Setting/GetSpecifiedDomains.php
api/v3/examples/Setting/GetValue.php
api/v3/examples/Setting/Revert.php
api/v3/examples/StateProvince/Create.php [new file with mode: 0644]
api/v3/examples/StateProvince/Delete.php [new file with mode: 0644]
api/v3/examples/StateProvince/Get.php [new file with mode: 0644]
api/v3/examples/StatusPreference/Create.php [new file with mode: 0644]
api/v3/examples/StatusPreference/Delete.php [new file with mode: 0644]
api/v3/examples/StatusPreference/Get.php [new file with mode: 0644]
api/v3/examples/Survey/ChainedGetDelete.php
api/v3/examples/Survey/Create.php
api/v3/examples/Survey/Delete.php
api/v3/examples/Survey/Get.php
api/v3/examples/SurveyRespondant/Get.php
api/v3/examples/System/Flush.php
api/v3/examples/Tag/Create.php
api/v3/examples/Tag/Delete.php
api/v3/examples/Tag/Get.php
api/v3/examples/Tag/GetFields.php
api/v3/examples/Tag/GetList.php
api/v3/examples/Tag/GetReturnArray.php
api/v3/examples/UFField/Create.php
api/v3/examples/UFField/Delete.php
api/v3/examples/UFField/Get.php
api/v3/examples/UFField/Replace.php
api/v3/examples/UFGroup/Create.php
api/v3/examples/UFGroup/Delete.php
api/v3/examples/UFGroup/Get.php
api/v3/examples/UFJoin/Create.php
api/v3/examples/UFJoin/Get.php
api/v3/examples/UFMatch/Get.php
api/v3/examples/Website/Create.php
api/v3/examples/Website/Delete.php
api/v3/examples/Website/Get.php
api/v3/examples/Website/GetFields.php
api/v3/examples/Website/GetWithMetadata.php

index adf4230f1357246e34874a2e519e38f1b2f8259c..b830541308b82072a34e0c925ac11be684ccff42 100644 (file)
@@ -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',
index 6cd8188ccb393c55a17101bc108da5ca80653dd7..8603caf946b6fc24ebc48fdbaa3c5fc1702b4a6e 100644 (file)
@@ -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',
       ),
     ),
   );
index 6615362918b295414621933769e8d94e5811f78c..a380f128d0bea2bd72619be3540c56ad83fd22a6 100644 (file)
@@ -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
 *
index 4833a1885bf38bed171fe692169aa549e6696420..54d9ace23213e44e993e6745fe368c3d39c8cd89 100644 (file)
@@ -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',
index f7052bc2aaf522bcfcfb72769808c733a8f59c97..e670e377e2f7884d2c6deb0ae7ec9d3e3e8e2235 100644 (file)
@@ -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',
index ac52fab2604d9ab8efdcc7057f377262d7ac40d0..1d981955898e80add961209b2d70ae4ae3e40846 100644 (file)
@@ -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',
index a6269d125a82742fe69910bd8cfd96fa8015de5c..76bca1d50070e383df652783a3fbed50260e4ca3 100644 (file)
@@ -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,
index 77b45f7bbbce1204e447491bc1bdc0a560e41c5c..003b333d37daf5152ef254d97c2174410ae6c884 100644 (file)
@@ -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',
     ),
   );
 
index 574a34a7b27cbf6859706b4e56e45f831e50920c..4042c39fff4ae8946b4ced77286657829cdf52ae 100644 (file)
@@ -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',
index ac5da5ced8f491528a8f30fffd2034132ef297ef..b3a231503be5467655f41d4ebed3d3bb47631938 100644 (file)
@@ -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.',
index a2158500c1a15e8560c2107d1af44ecdc46117bd..3befa05035d7e485d1fc4e5bb1c4229caf9c3886 100644 (file)
@@ -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',
index a6c11087a0d3d0422064ff1c45469894c85443d5..561e259a1eb5ccce15ed53f2f6dc3ee265716562 100644 (file)
@@ -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',
index 839b99005e172748227e91375573100ec4d88a9b..35f3a002d46afc69d73b8cab12a0a1b141c83bf9 100644 (file)
@@ -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',
             ),
index c79c27a426c837154073ac7659f748591ba201cd..5145682730e3646cb0cc4d939317e9cfad066e24 100644 (file)
@@ -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(
index c484a896c663c5a18fdc8d37e9f48211d126c4de..d9d6b8f49eed315b8a2c934b23e81ded291c857b 100644 (file)
@@ -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' => '',
index a1b3a68db3a1721f2dca340b08e04a156e4bff21..6bca265586b6a07580e2d29c5694e23008c542fc 100644 (file)
@@ -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,
index 8d2a4d3ff54de1e53f0e156b03063f5d053680a9..0c1f887ed412d029d91fddbd3ba81362da828ce6 100644 (file)
@@ -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' => '',
             ),
index 99e6a75588898ffd55ad09393087a6c2518043a6..f6ae673091d10b66f7f37279f5e413a9a520129b 100644 (file)
@@ -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',
               ),
index 9e0392a4dcdb1eecd8c33bce6f21231fd5814f54..107c95ded389111e7f356d9dc8a3f726a2f90c35 100644 (file)
@@ -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,
index 80021fa595a1d82b85255114007102dfbccc3c1b..7a66c4277b84121cde4e1269030a122a60d13866 100644 (file)
@@ -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' => '',
index ac3e7b3ab680e3b414474c874456e90bda1c4a96..07e8ae1e6e6ed9970a952f5481f3a16d83ebd78b 100644 (file)
@@ -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',
       ),
     ),
   );
index d5ac755842aa09050b34466c93581fc091e805cd..c1e47702bff5f10dd82092acd931ab33160b747d 100644 (file)
@@ -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',
       ),
     ),
   );
index bfb4f9976e7ee61789f5316fa1b3d39138ec0f44..1bb7f83feb3e21c2eea3bbc3f45bc60e84626884 100644 (file)
@@ -7,7 +7,7 @@
  */
 function contact_delete_example() {
   $params = array(
-    'id' => 1,
+    'id' => 3,
   );
 
   try{
index fb2556c9f48cc35b58d955ab7eaa89bbfbecb95b..9f666711fc9bdd632ca0cdf02ba2282bc5f3791e 100644 (file)
@@ -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',
       ),
     ),
   );
index a366b409581927430b2af1fc223f863acd32e78b..57972c52525932146d426b8efb3f28adc51895f1 100644 (file)
@@ -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',
index 67fadede7a07462b5e25dedd741c532a5745e1a2..4c1cf9865dd97db1d888e93e663dbb39b2eae33e 100644 (file)
@@ -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',
       ),
     ),
   );
index fe6ec8ee0965bb9f6da8fbf60eb5e5111c5a4a33..0ed270153050d214d61279657712a169de9eeacd 100644 (file)
@@ -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',
       ),
     ),
index 4a19762036ba1bc554ec2c46587aa2fe201b9b6c..394b0c36ada2a4d1a1700b253afc594e5da44103 100644 (file)
@@ -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',
       ),
     ),
index f756efed96d3a6ae173e61c0402dda2fdc13ec3e..a798c940b10f96510fbd7cf23ae5b1229f3b717e 100644 (file)
@@ -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',
       ),
     ),
index 8d7126cb897de7c0f5218e7f9f9b630623beca52..5209aa9aea94479b470d6f89333a9ba6d7eaaa22 100644 (file)
@@ -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',
       ),
     ),
index 9135fe3f9201247b95e9ff1e0b4cbbfca8d92269..9b4997039319cd65ec4e8eadd6a731a094b87a64 100644 (file)
@@ -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/
index 2c7234e41960bd60f593ba2c0930633821c4eb66..741e1763979750fe7d6a16188a4c9a372346f20d 100644 (file)
@@ -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/
index 0242584211948b8bebf064b1001ca75c115a69f0..c22b1b102d2219623ce027337592c4b5ae5fc69f 100644 (file)
@@ -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/
index 3649403beaa74b45d8ac2445d60e2b0e523b7187..0c5c06f58f2f04481605f20ec4e5a02f10530337 100644 (file)
@@ -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
 *
index bff46b83dedcecba07fae741c0264d5eefd665a7..8139aa301a4e42e16d11f01503aca666b5bed2eb 100644 (file)
@@ -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' => '',
index cc7cd888b2ee99f03f3f9c2184316e9dded66cef..0a6b234e907ec8f5066f488f1e2754c78f2525f0 100644 (file)
@@ -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
 *
index db56853f5d57ec3f0709b0b2b6aaca621ed5b237..c24c4dbcb3934d62c01380acb0cb23960e4151da 100644 (file)
@@ -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
 *
index f5b732f6f0f57ee27a320d0aac9214e46cc896a4..fba4f0585044d1bb82c40d67f66c061b1c22574d 100644 (file)
@@ -7,7 +7,7 @@
  */
 function contribution_recur_delete_example() {
   $params = array(
-    'id' => 3,
+    'id' => 4,
   );
 
   try{
index 091baaa5ef9e651c16e848bbc006597c4fc6093a..988b9bcfc9158c3b8a5ec4f29d5e9242623043d8 100644 (file)
@@ -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' => '',
index a631c34a07baf68d8ab5dd5f2f3a172bd9890482..79fcb15348a4d63e1086bffc6bc9c23d83435b37 100644 (file)
@@ -7,7 +7,7 @@
  */
 function country_delete_example() {
   $params = array(
-    'id' => 1253,
+    'id' => 1255,
   );
 
   try{
index d1cf00f99cdb3e26c33bc496fb6e63879eadc8de..dcd4d4431e8c707f23eb0d97179c09a087196c2b 100644 (file)
@@ -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',
index 9d117d4b9bb7b911880be192a9f27d7b3bba1ec0..83d812b1bfc975af24f6354fde4f14e169704984 100644 (file)
@@ -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{
index a51e13c015f974d6953fe9861b3c6f97246e9548..d3b1392145351614c7051d5409c80683dcf74496 100644 (file)
@@ -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',
       ),
     ),
   );
index 0eca96b971e40db0a5204481437fd7bc909e4960..556e307c48656940be379eaa24d2daeadc451534 100644 (file)
@@ -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,
index 22dfe5250c23be010671e1fe4ea2990769caa02a..0247cb3e9e92f0ad8ba75f5f380fe7070c2f30ec 100644 (file)
@@ -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',
       ),
index 5c8514e02f5a6128e219c1f9ecc91c859ad995a5..1060d3ccf79f6a0fc7963cb1831ecacb52434be6 100644 (file)
@@ -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',
index fe854b3d274c35c704303403f3ba821ae0f18947..40264b4c11e1e4753a067f3b73ce4aff39cc181f 100644 (file)
@@ -7,7 +7,7 @@
  */
 function job_delete_example() {
   $params = array(
-    'id' => 30,
+    'id' => 31,
   );
 
   try{
index 2f9a4dae9b6470febb0135cbe08bba472f86a8bb..0e95cdaf508e1322e1fe312ac810423f96f84c9a 100644 (file)
@@ -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',
       ),
     ),
index 1dad9943445b7c93a56ad417bd1b11557af4e4ec..c085b4497c1d80e89821be1a7bb0b99affd91bb8 100644 (file)
@@ -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{
index 0c5410ce6f86a532e6f12dc53112ee19765640c8..b4bcf6f7132ad90d5dc7202159e01a7b8b6638b2 100644 (file)
@@ -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' => '<p>This is {contact.display_name}.</p><p>{domain.address}{action.optOutUrl}</p>',
+    'body_html' => '<p>This is {contact.display_name}.</p><p><a href='https://civicrm.org/'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
     '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' => '<p>This is {contact.display_name}.</p><p><a href=\'https://civiÅ„crm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
+        'body_html' => '<p>This is {contact.display_name}.</p><p><a href=\'https://civicrm.org/\'>CiviCRM.org</a></p><p>{domain.address}{action.optOutUrl}</p>',
         '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',
             ),
index d274d8c82503f39b76bdb42f071652fcd678afff..b7f02cbc766fe86f46df736d2e35094a55d3100c 100644 (file)
@@ -7,7 +7,7 @@
  */
 function mailing_delete_example() {
   $params = array(
-    'id' => 18,
+    'id' => 20,
   );
 
   try{
index 1b328b7e6cc0688af2524f5e37643c3f7c55d15f..ffaae8983dd93e0a0ea4cf2672a862a206b9fdd7 100644 (file)
@@ -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' => '<p>Look ma, magic tokens in the markup!</p>',
         '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' => '',
       ),
     ),
   );
index e1189215f1a97f26cf2975f6e908676f5fd34bb5..c7ac42c59d77475b87d84c9a2ca9ce0a92536df1 100644 (file)
@@ -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',
       ),
     ),
   );
index 5f765f3f796f87b73edda0a14af46475ae68bc63..107c3cc7c3ce7d2ffbbac1ff990b0dd3ba5d32dd 100644 (file)
@@ -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' => '',
index fe9516e6632a3abe5cf44e2516942f2d63cfcf3a..42fa4d5b8b3fc803cde284146c969756da945a46 100644 (file)
@@ -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' => '',
index 13dc628132c6f3fbb64e456896bb5338c7fe0bbe..92109b857af7d24e0f6adf31678378234ce5c8ef 100644 (file)
@@ -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,
index 20f24d537d40fe27041bcc23d82640229d588547..8c4fb2aed6cee0b268c69fd7e9da06b0c138e4cf 100644 (file)
@@ -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',
       ),
     ),
index 1b593b34c2807d1b835b91db3a497b82cd65aca8..f93f9d1bcdd0c72875b4987ab1e92a4acf2eef32 100644 (file)
@@ -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' => '',
index 81cff6e5aeb07bdb70575a1c8396a569b4fa8294..1a01818506bb79707de9e384d1e411ecb580ea93 100644 (file)
@@ -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',
index f111b04bd406f1dab1d610ada06e05d6965b2db8..e9904be80405085112b41b8f0fdf7a99e93f5d3e 100644 (file)
@@ -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',
       ),
     ),
   );
index 094118233901e9664e5cc2f2249446a30327f012..7f2f51393bdd056401db885df59b36fa77e988d7 100644 (file)
@@ -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' => '',
index 1d47b6f0c8e06a03f58e8cc7ed94c61431d9600a..388e12c2ae0633d642b93fd69bb6f0a97755b991 100644 (file)
@@ -7,7 +7,7 @@
  */
 function message_template_delete_example() {
   $params = array(
-    'id' => 70,
+    'id' => 72,
   );
 
   try{
index d3ab1005bcfc1e85262625fbf33ecbc99e8664f6..318d8aada33c7eccc6622c6919dbe2422fd26214 100644 (file)
@@ -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',
       ),
     ),
   );
index 7220e3db6ea71a31d785426ce260f916b5feedbc..cee25ba50b24470a8f7671d72e4beca408c4e074 100644 (file)
@@ -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,
       ),
     ),
   );
index cdf194ec7527ee0f8756bc13f8eb29673b4fafa7..20839505b8fad0e44a7de4703ec559312732472c 100644 (file)
@@ -7,7 +7,7 @@
  */
 function option_group_delete_example() {
   $params = array(
-    'id' => 98,
+    'id' => 97,
   );
 
   try{
index 30f5aad2c53ffe79b61dcce9a420ecee6e8d279c..2e6ea262cac1069bc363038a2875641227ceb659 100644 (file)
@@ -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',
index 45ea551fcd2a78d96e0535395ff2216895e22ed7..264b1493bd41f5df1f351577c415b93e9481dc3c 100644 (file)
@@ -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',
index aa65ab5fd04560d92027c7d2ad6f677facfbb21e..b1a8a1040119fe0f6099e38192e0cadade97eede 100644 (file)
@@ -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',
index 10a3c2c84954c4e90795eb29f5e0ef4af09d7443..720596c3d716f9d0b6b6bd3303c80961cf2660e4 100644 (file)
@@ -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',
           ),
         ),
       ),
index 8ab8b98dda950c82bda0a3f0fae1b59e7bb4c044..15aa07367eb16d639b97a40559e9ef68f921b359 100644 (file)
@@ -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',
index 1e06e9540ed7b8de60e0c117102f16cf86b12c17..52ad6116ac95bca0c43be926b76694198468fd10 100644 (file)
@@ -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' => '',
index b9429731c749fa0fe120084bb693aecef60d73b3..37555e4bebf134476d806b95266ca85b6d9bfc20 100644 (file)
@@ -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' => '',
index 78f22366da83a4cf709b7f16674315fef2214902..c6b335e63d25fc8c5d5694b46c74b97506a61373 100644 (file)
@@ -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',
index 96a4481c51cb8c3ca24a787418518aae2fb4d7eb..9059a8b3225bcc6fb9c6298beaeb74d669ec5f8b 100644 (file)
@@ -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',
index 258aa4af10e59e57fbae27bbf6b09d532a7481a7..ae4fa45657092458eca5bcc4c71fb03d3bca93ef 100644 (file)
@@ -7,7 +7,7 @@
  */
 function participant_status_type_delete_example() {
   $params = array(
-    'id' => 18,
+    'id' => 19,
   );
 
   try{
index 318d9b5e794231de9768bec671e9dbd1c5b5ee5f..7eb41e6d0f06ef7f713ae90e2e51abcd234b0881 100644 (file)
@@ -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',
index bd71ea4426aefbb9642b12ef5aa0d3afdc6bf84e..84e18f440781f0fc9b0e5cc50a610492e5d22423 100644 (file)
@@ -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',
index 4a8efaae330d8ddb6eee4c7492a07fc9b9091dc8..6ece14b33acd50ffc679c8cdd53aafa5d367f884 100644 (file)
@@ -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',
index b9a9b971c183322986d8e8140d681390799c7817..f2b1613a61a4feb76304c0910ade14194cadc631 100644 (file)
@@ -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',
index c5be86b58c533827dc58c785417d907ae405136d..51bc8727f919d06702a455d7e6ae2f2c2f164790 100644 (file)
@@ -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,
     );
index c56d91ec57c4e903ef08e36e2adef37918e97199..ac1263d504c3b8d011b736f7f42336b5bd9fa5e2 100644 (file)
@@ -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,
     );
index d240cbfe2eee316120e9ee92c578710b884b454e..81e017e22305fd9be504ec1ad2c03907fa4c5c27 100644 (file)
@@ -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',
index 7d911e279af55eaaf77a4baa58610b3edc190579..aa481f9fbcd397362314549aac5ea192cb1b4835 100644 (file)
@@ -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' => '',
       ),
     ),
   );
index d726926a9a897916e339b398bb90b59929a711b5..a633f4c4bf006f43c06e16eabb55167f6ed84304 100644 (file)
@@ -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;
index d7803ec4045fbc39c697a18c0844d4fe24b3f890..d6fc4c1e14323a5e968d814ff5d4953df61fa799 100644 (file)
@@ -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',
       ),
     ),
   );
index 49ac762dd3005e1627744f54fd92013cf2eabc53..d5a6c6d5b088ba18b2d62b670669ad737e61a194 100644 (file)
@@ -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 (file)
index 0000000..854c185
--- /dev/null
@@ -0,0 +1,93 @@
+<?php
+/**
+ * Test Generated example demonstrating the PaymentToken.create API.
+ *
+ * Create a payment token - Note use of relative dates here:
+ * @link http://www.php.net/manual/en/datetime.formats.relative.php.
+ *
+ * @return array
+ *   API result array
+ */
+function payment_token_create_example() {
+  $params = array(
+    'token' => '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 (file)
index 0000000..460d6ad
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Test Generated example demonstrating the PaymentToken.delete API.
+ *
+ * @return array
+ *   API result array
+ */
+function payment_token_delete_example() {
+  $params = array(
+    'id' => 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 (file)
index 0000000..101c847
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Test Generated example demonstrating the PaymentToken.get API.
+ *
+ * @return array
+ *   API result array
+ */
+function payment_token_get_example() {
+  $params = array(
+    'token' => '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 (file)
index 0000000..d3481c7
--- /dev/null
@@ -0,0 +1,93 @@
+<?php
+/**
+ * Test Generated example demonstrating the Pcp.create API.
+ *
+ * @return array
+ *   API result array
+ */
+function pcp_create_example() {
+  $params = array(
+    'title' => '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
+*/
index ea022ea735131d53387be7997a4fab973b8edeba..384cf28e1f37defa64bd7fb4e93b3cf7754441e2 100644 (file)
@@ -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,
     );
index 363998ab9b7f3efc6a5e9853b880be6f4d7699f9..6f4b97e22a1d4f9a0a9074e018c0c8107cf1f7c7 100644 (file)
@@ -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;
index f22274d9e26c9a0a7e01d05467b03a4d12345444..ef1a0794c99ec2cf00eab81a3431ff1b55bf0cb7 100644 (file)
@@ -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,
     );
index 6bd0f386de0fa040e591dd1b447249e97794ae6b..c138d72251f16e01095c8a799c782919ce9c314c 100644 (file)
@@ -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,
     );
index 02b53fdf620f783aec3ed57c8d74af151c7f21ab..17e4780458af390a30fb4581df9818b3236ae4a0 100644 (file)
@@ -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,
     );
index 0ac2a326450f79833a3cb0ebca89bcc257651445..541ca67466de09e863d195f6d3e7474cb21f2e09 100644 (file)
@@ -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',
index 6e52589e8e42deded9492fd88a52f2201a8d7453..64b6b3ce57cb3622a6b47d183c8616405e4cdcf9 100644 (file)
@@ -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',
index 1e8c21e3eb43c79fe0bf6d18dd8e3c96ac03b3dd..bfbe8f64fae1d27527871097958389d6516da0b8 100644 (file)
@@ -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,
     );
index d54893ba45d6583ff0144f8a445fabdf82a0c32d..3a0faa1372ca119e23133559131bd162cc206eca 100644 (file)
@@ -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,
     );
index 17f2e27c273eb420003f010764d82a80374ca2e0..20018f0088111dc0855e63abf7832b404da7bea4 100644 (file)
@@ -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,
     );
index eaa3178ceec6a37964d698d00b1628b540bef958..202ba48ac89dbc8270998c51c9d9c97e9dcfdbd2 100644 (file)
@@ -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,
     );
index 8339479cb382acf2701b24191ebeef8971439f98..054a7a65fb87eebe78a52d768eac2ac6015da35b 100644 (file)
@@ -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,
     );
index 3d23332a4471d8ee0fdbb2fafbda8848ee2c92b2..2e1f037fffde7bb85841ff27105a2a3f127d5049 100644 (file)
@@ -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,
     );
index 953f6d195752075f3eed74defce60d8c0e78a480..c3da7002da476e75372af93c4c339f012efec66c 100644 (file)
@@ -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,
     );
index 567c0b9d06d6f815b5faa1bb228bab6df82c8909..a833aa785e7c5354a7e643947016fa37ced3426e 100644 (file)
@@ -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',
       ),
     ),
index 1eb72a66d3b87470416eb2341d20a4584eb4fb23..084aac721b9d33705fba005d38b7272bb3500fe4 100644 (file)
@@ -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;
index 1944cde832a0ca12509e728bf64dde60a628a0ad..9443533d1c075653b9fd551ad9ab05869f908723 100644 (file)
@@ -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',
       ),
     ),
   );
index 52734d083ed64193fbad3cfbb79d878f78611ffa..bf801c3eac02522d8d03b1a16bcda4e5ebf50264 100644 (file)
@@ -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' => '',
       ),
     ),
   );
index 5360087383ff66d2ead599b7ea5573966d21d6cc..3929b96906d51f9f119b094d45ca1ccf0f658af8 100644 (file)
@@ -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,
     );
index b5468e8277c4500fe50ef7ec387a6152a6af5813..7be052caa0e62fb15a2b904cd49c82608fea3abb 100644 (file)
@@ -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(),
       ),
     ),
index 60c8da1e7e5c8d34d88a6401c3c631e8a21e359c..57b867c4d3334dd4f238178107e1de1512d08c1d 100644 (file)
@@ -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,
     );
index 415ba5cde918ec9a56babfdca4099a1042f96599..9a34012a834765680ba3f7c8322eef3a1158837c 100644 (file)
@@ -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,
     );
index 81ec33c5c64501febca9cf5c20950085d8d796d3..48b62cee421c8b890b37e51421dec723af0bcb2c 100644 (file)
@@ -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(),
       ),
index 03c6ef75d730991d92f831a32ed1d26e3b0c3052..a8b26e325c92ab743a0c4e343a55c140edb2d7ad 100644 (file)
@@ -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,
     );
index 2a04935a837e26e50e985805d54efe21507f6d3f..d7dfa39ddd96d86b634df63f2c4e75b87370170a 100644 (file)
@@ -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,
       ),
index 1c4c1586f189e044104d5a22bcce162412284620..1978de2bde515f2de131aac8e25aa3c7fb295c42 100644 (file)
@@ -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,
     );
index 1e8cafd512ec553a51106e49fbd556a95f3c25e6..74e4ffc30211eb479fa5d9553adff115f2ed3ec3 100644 (file)
@@ -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,
     );
index b1a865ccb105b5e123f2811629446e64f8d66427..9d21e1f7812408479a8596e3c0eaa6183199a110 100644 (file)
@@ -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',
index afbd42c46594946d19139819316f590e16b26a6e..3a907c0f1a27ba4575a28d3ca72e563f28cfd5de 100644 (file)
@@ -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,
       ),
index 091ea47cec2bedfc8d8cd4bf47e0fcaee3df4f6d..31a8a7345443d2c6d1e77244897b1e26874b2871 100644 (file)
@@ -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,
       ),
index 024c3952e869162d00e4f06690d9aac1d359dc88..5e77fe8b30c0f6d7629aa45bf261f611aaa545f1 100644 (file)
@@ -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,
       ),
index d12bccc3f97204dc54295f0db79234e7099510a5..c4aee7a37ae389b2a81181e3745ba9a70d6324f9 100644 (file)
@@ -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,
       ),
index 2d458c4dbf02e1cb1c41051399e614a8c704266d..42826f114c59de16ff01686fe3dfdd8fdc774470 100644 (file)
@@ -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,
     );
index 6b1dd50373021ab1bcdcee64d14db5a7a3557ed6..d331378cdc9f95633737dad61686ff581a444e37 100644 (file)
@@ -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;
index 8c790439fd8ade252affc0773d26f05b1687cd0d..25dc1d5fc6b40a18c9ad89e0dd0581833e09fb97 100644 (file)
@@ -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&amp;reset=1&amp;force=1&amp;id_op=eq&amp;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&amp;reset=1&amp;force=1&amp;id_op=eq&amp;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&amp;reset=1&amp;force=1&amp;id_op=eq&amp;id_value=1',
+        'civicrm_contact_sort_name_hover' => 'View Contact Detail Report for this contact',
       ),
     ),
     'metadata' => array(
index bc98a485fe3b9c526b77a2faee029a6085eeff8a..d9c9dc340c8941dfd0dc4075e7aec36069967153 100644 (file)
@@ -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 (file)
index 0000000..31d677d
--- /dev/null
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Test Generated example demonstrating the SavedSearch.create API.
+ *
+ * @return array
+ *   API result array
+ */
+function saved_search_create_example() {
+  $params = array(
+    'form_values' => 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 (file)
index 0000000..3d0052b
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Test Generated example demonstrating the SavedSearch.delete API.
+ *
+ * @return array
+ *   API result array
+ */
+function saved_search_delete_example() {
+  $params = array(
+    'id' => 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 (file)
index 0000000..14adb3a
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Test Generated example demonstrating the SavedSearch.get API.
+ *
+ * @return array
+ *   API result array
+ */
+function saved_search_get_example() {
+  $params = array(
+    'id' => 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
+*/
index 466890049cfd068a2b8245e18d50d3fac2571339..3f92f961375dac70c2befd52751274a93682f82b 100644 (file)
@@ -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,
     );
index ec2115963355a78e42cc667429417a3ae23d63c0..37a4d5efc4b86e3a81666bcc3a935a3b7800d80f 100644 (file)
@@ -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,
     );
index a43b968efca8e906075ad68f3aae67b5198c306b..c0e189dcb2fa1c02e4459b203a22292892b72762 100644 (file)
@@ -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,
     );
index e889f6c3a070346c726bfbd92d044b7737ca0986..a54f24ab94976f8d2debb7adba08be2454b1328e 100644 (file)
@@ -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,
     );
index 270c1e5e5484132d0a8da230a5b11cf2db02d2b9..522fb14a8e2b157d8bc3a9236b32d3f9f4fed311 100644 (file)
@@ -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,
     );
index 4aab2582fa19878c626e700763cb1a0ecfbf0fd5..3a446f13d893419432be26df0852df762b3c234e 100644 (file)
@@ -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,
     );
index 3cb02ca81398b28ecf634bf5fbcb28b80989145f..1a5e7d9b2d8f4298b62550b1c9a3c6c9692605ea 100644 (file)
@@ -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,
     );
index df623eb6ceccbce7196ca877577623651e759c72..9e6170e70d97560be91a4567b6e038b3394b852b 100644 (file)
@@ -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' => '\ 11\ 12\ 13\ 14\ 15\ 16\ 17\ 18\ 19\ 110\ 111\ 113\ 1',
         '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' => '\ 11\ 12\ 13\ 14\ 15\ 16\ 17\ 18\ 19\ 111\ 112\ 114\ 115\ 116\ 117\ 1',
         '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' => '\ 11\ 12\ 13\ 14\ 15\ 16\ 17\ 18\ 19\ 110\ 111\ 112\ 113\ 115\ 116\ 117\ 118\ 119\ 1',
         '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' => '\ 11\ 12\ 13\ 14\ 15\ 17\ 18\ 1',
         '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' => '\ 11\ 12\ 13\ 14\ 15\ 16\ 18\ 19\ 110\ 111\ 1',
         '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' => '\ 11\ 12\ 1',
         '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' => '\ 11\ 12\ 1',
         '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 <a href=\"https://developers.google.com/recaptcha/docs/display#config\">Customizing the Look and Feel of reCAPTCHA</a>.',
+        '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',
       ),
     ),
   );
index 5ace770b00abde215966fd6915f041a66ee04f8b..3b465448174d8bd9cc79610a92d880534e6c6443 100644 (file)
@@ -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,
     );
index 683e6618b3eb5eabacb0dd0c7428397f903be688..ef6db54e00254e97ee5ee87f84b604f205e5dd8f 100644 (file)
@@ -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,
     );
index 8ee9aa41f253cf2617b76e6af33ad1468fb3b301..10991cc435bb1d8fb872dd673e90a1251e32c90a 100644 (file)
@@ -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,
     );
index 9eb77d993e15245e6b153ea54302e0d08eedfe76..40631b92af01345de5646a3b8ac27cea27ca7404 100644 (file)
@@ -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 (file)
index 0000000..d8e8e56
--- /dev/null
@@ -0,0 +1,80 @@
+<?php
+/**
+ * Test Generated example demonstrating the StateProvince.create API.
+ *
+ * @return array
+ *   API result array
+ */
+function state_province_create_example() {
+  $params = array(
+    'name' => '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 (file)
index 0000000..6d3d142
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Test Generated example demonstrating the StateProvince.delete API.
+ *
+ * @return array
+ *   API result array
+ */
+function state_province_delete_example() {
+  $params = array(
+    'id' => 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 (file)
index 0000000..c4f1ace
--- /dev/null
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Test Generated example demonstrating the StateProvince.get API.
+ *
+ * @return array
+ *   API result array
+ */
+function state_province_get_example() {
+  $params = array(
+    'name' => '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 (file)
index 0000000..01ae882
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Test Generated example demonstrating the StatusPreference.create API.
+ *
+ * @return array
+ *   API result array
+ */
+function status_preference_create_example() {
+  $params = array(
+    'name' => '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 (file)
index 0000000..8c3d75f
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Test Generated example demonstrating the StatusPreference.delete API.
+ *
+ * @return array
+ *   API result array
+ */
+function status_preference_delete_example() {
+  $params = array(
+    'id' => 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 (file)
index 0000000..b1334a9
--- /dev/null
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Test Generated example demonstrating the StatusPreference.get API.
+ *
+ * @return array
+ *   API result array
+ */
+function status_preference_get_example() {
+  $params = array(
+    'id' => 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
+*/
index 2a218305a4f753a58f45d50139d78d6331c20c08..860366008bd5dee54826408773d33e276ccd91c4 100644 (file)
@@ -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,
         ),
       ),
     ),
index 11a84829142f611555f30d67fc7faabdea8d5731..09a73872516cb1334f61e4ebf5b7a021b6fa8fbb 100644 (file)
@@ -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,
     );
index b2b7f6d1a6d860201f7235f60f3291cbd106a9ba..2a15ecb7be4384368ac454bad23df963be3274e9 100644 (file)
@@ -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;
index 43038c18303d61f0ac3012b1315dcb113a925342..f1c14e1b4416759245ddb047407e15dd3aff580e 100644 (file)
@@ -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,
     );
index b07f6a770f730ece8992604d74a0b2bbeacc2ccb..93614aacf45ed2bc28235edce61e65c97754fd9b 100644 (file)
@@ -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,
     );
index 0d124c21444f77aeb58bf1801ddbd1648108dad8..dab2f325a42a780b08ffbc2a4361d4f86cf674cc 100644 (file)
@@ -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,
     );
index 503eacabdb8a1eec2fd0811b052e0c06475c63f2..3add021f743f166f4ff4ad47b2f4299b781aea32 100644 (file)
@@ -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',
       ),
     ),
index b1112ad56bd2318e101a3ff58a4ac26776ce5a5f..75f072716aa16e9cc1dd61b9885f074a692bc459 100644 (file)
@@ -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;
index 8860a11c72e9cd09380be3557a3af021e1cea8ff..a39d5c6a8e57ac4ec11c6fbb94963d4850eaad98 100644 (file)
@@ -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,
     );
index eb38f1819234732bf5d354d753b2205c8f760e4c..c00491e909f6e7c57d99dc3feed04b7abcb69af7 100644 (file)
@@ -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',
       ),
     ),
   );
index 9dd6c6ebc83eff00cc36784199a53619c351e90a..08db458290490a953b1570e21c2ae0d21c37b00b 100644 (file)
@@ -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,
     );
index e3cb5b396bc572afafc8d60b5845a892133ac5fe..ae5465dce79c7a9d6ae40436f7e234702dbe25a0 100644 (file)
@@ -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,
     );
index ec39ee0013833f21a10c5ba5d5be1f6cec1efdd0..6710ce7375c817db8e448c22937e58ea6947b69e 100644 (file)
@@ -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,
     );
index a766ac75845927c1a58e807ab67aef88c5ad7319..996cb148ee73721bfaee4292edc3155f43fc4ec4 100644 (file)
@@ -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,
     );
index 9c52c59d20418abb53adedf7cd4b6482b0c0aa72..c6c1a6b2df4494ca0ccf4d61d52965be106a1916 100644 (file)
@@ -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,
     );
index f94ad49347d9066536b138bbdc647b4c7b5ac5b6..992d678986a662dc0e71ea79779e3c2efb385fd6 100644 (file)
@@ -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,
     );
index fdf7ada9352970353a5dab2f30ffa29e62dc2a8d..ade13f1fbe2cad305c994de0139787cd521303c5 100644 (file)
@@ -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' => '',
index c2be5ea33089e6c08deba871c5224951e41f4c0a..68855a931e51228f8d3b0c1d0c9048f52f0ad60d 100644 (file)
@@ -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;
index b35be5d2ba09cf178e61b28c018b766571a188df..1ce438b38b975e5e1c152002b3dda4566cd1d83a 100644 (file)
@@ -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,
index fa380d97d2c23f135424851bb4cae010a6750512..45eb69fec1c9109fd3802bdbc47ad9e4e919ce64 100644 (file)
@@ -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
 *
index 1328f59812e2d15d23ea3c298ab94bb55cdd9b4f..6f38609a02de252ffc443cf6090afb436d49a1fe 100644 (file)
@@ -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,
     );
index de24f6be46c28f60022ffa51fff79fc1a2ac452e..dddd476237eb2ca74af5badcd4bbf4ddc858d126 100644 (file)
@@ -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,
     );
index 89a347ffbde261d88a6858f0036470b08806a85b..1e1d4e10fa0ab892c3d2d191674e96be335f2e98 100644 (file)
@@ -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,
     );
index fea28bf1645b24c59919101975abad2c7d4eddad..e40f33ac4ba072cfbd83b3482a926b7bf69c2c91 100644 (file)
@@ -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,
     );
index 4b26815ce96b001f01cd97293fc288fa7a1fb2d0..75474912271286714ce1d566a0d13bdfda1e5462 100644 (file)
@@ -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,
     );
index 915c3c238aa6bd89a418c74c2b6cabf1e0a54aa1..1f163d8dc5a409c51f6306e37e72fd392773fa4d 100644 (file)
@@ -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',
         ),
       ),
     ),
index db2e42874cdfcf55e3aab181c335c2111bedfa18..24c4467ddd2a3dcdf5be2222243343d775730cfa 100644 (file)
@@ -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',
           ),
         ),
       ),