Elgg  Version master
debugging.php
Go to the documentation of this file.
1 <?php
6 $config = elgg()->config;
7 $value = $config->hasInitialValue('debug') ? $config->getInitialValue('debug') : $config->debug;
8 
9 $help = elgg_echo('installation:debug');
10 if ($config->hasInitialValue('debug')) {
11  $help .= '<br>' . elgg_echo('admin:settings:in_settings_file');
12 }
13 
15  '#type' => 'select',
16  'options_values' => [
17  '' => elgg_echo('installation:debug:none'),
18  \Psr\Log\LogLevel::ERROR => elgg_echo('installation:debug:error'),
19  \Psr\Log\LogLevel::WARNING => elgg_echo('installation:debug:warning'),
20  \Psr\Log\LogLevel::NOTICE => elgg_echo('installation:debug:notice'),
21  \Psr\Log\LogLevel::INFO => elgg_echo('installation:debug:info'),
22  ],
23  'name' => 'debug',
24  '#label' => elgg_echo('installation:debug:label'),
25  '#help' => $help,
26  'value' => $value,
27  'disabled' => $config->hasInitialValue('debug'),
28 ]);
29 
30 echo elgg_view_module('info', elgg_echo('admin:legend:debug'), $body, ['id' => 'elgg-settings-advanced-debugging']);
elgg
Definition: install.js:27
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
Definition: views.php:919
if($config->hasInitialValue('debug')) $body
Definition: debugging.php:14
elgg_view_field(array $params=[])
Renders a form field, usually with a wrapper element, a label, help text, etc.
Definition: views.php:1112
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
$help
Definition: debugging.php:9
$config
Advanced site settings, debugging section.
Definition: debugging.php:6
$value
Definition: debugging.php:7