CRM-17407 renaming recaptcha keys
[civicrm-core.git] / api / v3 / examples / Setting / GetFields.php
index c2fbc5d524770d55a977a15fbf7089538f9691a5..c797b6fe9548be5f324a560001c382749ddc1b2a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Test Generated example of using setting getfields API.
+ * Test Generated example demonstrating the Setting.getfields API.
  *
  * Demonstrate return from getfields - see subfolder for variants
  *
@@ -11,7 +11,7 @@ function setting_getfields_example() {
   $params = array();
 
   try{
-    $result = civicrm_api3('setting', 'getfields', $params);
+    $result = civicrm_api3('Setting', 'getfields', $params);
   }
   catch (CiviCRM_API3_Exception $e) {
     // Handle error here.
@@ -639,11 +639,11 @@ function setting_getfields_expectedresult() {
         'config_only' => 1,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 64,
           'maxlength' => 256,
         ),
+        'html_type' => 'Text',
         'default' => '',
         'add' => '4.3',
         'title' => 'Path to wkhtmltopdf executable',
@@ -660,14 +660,14 @@ function setting_getfields_expectedresult() {
         'config_only' => 1,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 64,
           'maxlength' => 64,
         ),
+        'html_type' => 'Text',
         'default' => '',
         'add' => '4.3',
-        'title' => 'Recaptcha Public Key',
+        'title' => 'Recaptcha Site Key',
         'is_domain' => 1,
         'is_contact' => 0,
         'description' => '',
@@ -681,14 +681,14 @@ function setting_getfields_expectedresult() {
         'config_only' => 1,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 64,
           'maxlength' => 64,
         ),
+        'html_type' => 'Text',
         'default' => '',
         'add' => '4.3',
-        'title' => 'Recaptcha Private Key',
+        'title' => 'Recaptcha Secret Key',
         'is_domain' => 1,
         'is_contact' => 0,
         'description' => '',
@@ -702,11 +702,11 @@ function setting_getfields_expectedresult() {
         'config_only' => 1,
         'type' => 'Integer',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 3,
           'maxlength' => 5,
         ),
+        'html_type' => 'Text',
         'default' => '',
         'add' => '4.3',
         'title' => 'Dashboard cache timeout',
@@ -722,11 +722,11 @@ function setting_getfields_expectedresult() {
         'prefetch' => 1,
         'type' => 'Integer',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 2,
           'maxlength' => 8,
         ),
+        'html_type' => 'Text',
         'default' => 7,
         'add' => '4.3',
         'title' => 'Checksum Lifespan',
@@ -742,11 +742,11 @@ function setting_getfields_expectedresult() {
         'prefetch' => 0,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 64,
           'maxlength' => 128,
         ),
+        'html_type' => 'Text',
         'default' => '*default*',
         'add' => '4.3',
         'title' => 'Blog Feed URL',
@@ -762,11 +762,11 @@ function setting_getfields_expectedresult() {
         'prefetch' => 0,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 64,
           'maxlength' => 128,
         ),
+        'html_type' => 'Text',
         'default' => '*default*',
         'add' => '4.3',
         'title' => 'Community Messages URL',
@@ -783,11 +783,11 @@ function setting_getfields_expectedresult() {
         'config_only' => 1,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 16,
           'maxlength' => 16,
         ),
+        'html_type' => 'Text',
         'default' => '',
         'add' => '4.3',
         'title' => 'Resource Cache Code',
@@ -868,14 +868,9 @@ function setting_getfields_expectedresult() {
         'description' => '',
         'help_text' => '',
         'on_change' => array(
-          '0' => array(
-            '0' => 'CRM_Case_Info',
-            '1' => 'onToggleComponents',
-          ),
-          '1' => array(
-            '0' => 'CRM_Core_Component',
-            '1' => 'flushEnabledComponents',
-          ),
+          '0' => 'CRM_Case_Info::onToggleComponents',
+          '1' => 'CRM_Core_Component::flushEnabledComponents',
+          '2' => 'call://resources/resetCacheCode',
         ),
       ),
       'disable_core_css' => array(
@@ -907,37 +902,36 @@ function setting_getfields_expectedresult() {
         'description' => 'When enabled, \"empowered by CiviCRM\" is displayed at the bottom of public forms.',
         'help_text' => '',
       ),
-      'debug_enabled' => array(
+      'userFrameworkLogging' => array(
         'group_name' => 'Developer Preferences',
         'group' => 'developer',
-        'name' => 'debug_enabled',
-        'config_key' => 'debug',
+        'name' => 'userFrameworkLogging',
         'type' => 'Boolean',
         'quick_form_type' => 'YesNo',
         'default' => 0,
         'add' => '4.3',
-        'title' => 'Enable Debugging',
+        'title' => 'Enable Drupal Watchdog Logging',
         'is_domain' => 1,
         'is_contact' => 0,
-        'description' => 'Set this value to Yes if you want to use one of CiviCRM\'s debugging tools. This feature should NOT be enabled for production sites',
+        'description' => 'Set this value to Yes if you want CiviCRM error/debugging messages to appear in the Drupal error logs',
         'prefetch' => 1,
-        'help_text' => 'Do not turn this on on production sites',
+        '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)',
       ),
-      'userFrameworkLogging' => array(
+      'debug_enabled' => array(
         'group_name' => 'Developer Preferences',
         'group' => 'developer',
-        'name' => 'userFrameworkLogging',
+        'name' => 'debug_enabled',
+        'config_key' => 'debug',
         'type' => 'Boolean',
         'quick_form_type' => 'YesNo',
         'default' => 0,
         'add' => '4.3',
-        'title' => 'Enable Drupal Watchdog Logging',
+        'title' => 'Enable Debugging',
         'is_domain' => 1,
         'is_contact' => 0,
-        'description' => 'Set this value to Yes if you want CiviCRM error/debugging messages to also appear in Drupal error logs',
+        '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' => '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)',
+        'help_text' => 'Do not turn this on on production sites',
       ),
       'backtrace' => array(
         'group_name' => 'Developer Preferences',
@@ -953,21 +947,6 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t
         '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,
       ),
-      'fatalErrorTemplate' => array(
-        'group_name' => 'Developer Preferences',
-        'group' => 'developer',
-        'name' => 'fatalErrorTemplate',
-        'type' => 'String',
-        'quick_form_type' => 'Element',
-        'html_type' => 'text',
-        'default' => 'CRM/common/fatal.tpl',
-        'add' => '4.3',
-        'title' => 'Fatal Error Template',
-        'is_domain' => 1,
-        'is_contact' => 0,
-        'description' => 'Enter the path and filename for a custom Smarty template if you want to define your own screen for displaying fatal errors.',
-        'prefetch' => 1,
-      ),
       'fatalErrorHandler' => array(
         'group_name' => 'Developer Preferences',
         'group' => 'developer',
@@ -1343,10 +1322,10 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t
         'html_type' => 'checkbox',
         'default' => 0,
         'add' => '4.1',
-        'title' => 'Enable Double Opt-in for Profile Group(s) field',
+        'title' => 'Track replies using VERP in Reply-To header',
         'is_domain' => 1,
         'is_contact' => 0,
-        'description' => 'When CiviMail is enabled, users who \"subscribe\" to a group from a profile Group(s) checkbox will receive a confirmation email. They must respond (opt-in) before they are added to the group.',
+        'description' => 'If checked, mailings will default to tracking replies using VERP-ed Reply-To. ',
         'help_text' => '',
         'validate_callback' => 'CRM_Core_BAO_Setting::validateBoolSetting',
       ),
@@ -1565,11 +1544,11 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t
         'prefetch' => 0,
         'type' => 'String',
         'quick_form_type' => 'Element',
-        'html_type' => 'Text',
         'html_attributes' => array(
           'size' => 64,
           'maxlength' => 64,
         ),
+        'html_type' => 'Text',
         'default' => 'simple',
         'add' => '4.5',
         'title' => 'How to handle full-tet queries',
@@ -1629,11 +1608,10 @@ In the case of Drupal, this will cause all CiviCRM error messages to appear in t
   return $expectedResult;
 }
 
-/**
+/*
 * This example has been generated from the API test suite.
-* The test that created it is called
-* testGetFields
-* and can be found in
+* The test that created it is called "testGetFields"
+* and can be found at:
 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/SettingTest.php
 *
 * You can see the outcome of the API tests at