Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
bc77d7c0 | 4 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 5 | | | |
bc77d7c0 TO |
6 | | This work is published under the GNU AGPLv3 license with some | |
7 | | permitted exceptions and without any warranty. For full license | | |
8 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 | 9 | +--------------------------------------------------------------------+ |
d25dd0ee | 10 | */ |
6a488035 TO |
11 | |
12 | /** | |
13 | * | |
14 | * @package CRM | |
ca5cec67 | 15 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
6a488035 TO |
16 | */ |
17 | ||
18 | /** | |
ce064e4f | 19 | * This class generates form components for Error Handling and Debugging. |
6a488035 TO |
20 | */ |
21 | class CRM_Admin_Form_Setting_Debugging extends CRM_Admin_Form_Setting { | |
22 | ||
be2fb01f | 23 | protected $_settings = [ |
5d0140d9 TO |
24 | 'debug_enabled' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, |
25 | 'backtrace' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, | |
5d0140d9 | 26 | 'fatalErrorHandler' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, |
e7b8261d | 27 | 'assetCache' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, |
f008885c | 28 | 'environment' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME, |
be2fb01f | 29 | ]; |
353ffa53 | 30 | |
6a488035 | 31 | /** |
eceb18cc | 32 | * Build the form object. |
6a488035 TO |
33 | */ |
34 | public function buildQuickForm() { | |
483cfbc4 | 35 | $this->setTitle(ts(' Settings - Debugging and Error Handling ')); |
8f055120 | 36 | if (CRM_Core_Config::singleton()->userSystem->supports_UF_Logging == '1') { |
5d0140d9 | 37 | $this->_settings['userFrameworkLogging'] = CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME; |
6a488035 | 38 | } |
6a488035 TO |
39 | |
40 | parent::buildQuickForm(); | |
8a078f99 | 41 | if (Civi::settings()->getMandatory('environment') !== NULL) { |
03c5ceba | 42 | $element = $this->getElement('environment'); |
43 | $element->freeze(); | |
44 | CRM_Core_Session::setStatus(ts('The environment settings have been disabled because it has been overridden in the settings file.'), ts('Environment settings'), 'info'); | |
f008885c | 45 | } |
f008885c E |
46 | } |
47 | ||
6a488035 | 48 | } |