Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2015-02-25-11-27-40
[civicrm-core.git] / api / v3 / examples / Setting / GetFields.php
index b08a94cacde9f50c1a58efa8e594c2249c977283..87a74e7be09fafb9c9f89fec0f1172dd907c0d97 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.
@@ -902,36 +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',
@@ -1623,11 +1623,10 @@ function setting_getfields_expectedresult() {
   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