function lagoon_logs_settings_display in Lagoon Logs 7
Form to display current Lagoon Logs settings (READ ONLY)
1 string reference to 'lagoon_logs_settings_display'
- lagoon_logs_menu in ./
lagoon_logs.module - Implements hook_menu()
File
- ./
lagoon_logs.module, line 24
Code
function lagoon_logs_settings_display() {
$form = [];
$form['lagoon_logs_enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enabled'),
'#description' => t('Send logs to Lagoon or not.'),
'#default_value' => variable_get('lagoon_logs_enabled', TRUE),
);
$form['lagoon_logs_description'] = [
'#prefix' => '<div class="ll-settings-description">',
'#suffix' => '</div>',
'#markup' => t('Current settings for the Lagoon Logs module. The defaults are set in configuration, this is meant primarily for troubleshooting.'),
];
$form['lagoon_logs_host'] = [
'#prefix' => '<div class="ll-settings-key-value">',
'#suffix' => '</div>',
'#markup' => t('Logstash host: ') . variable_get('LAGOON_LOGS_HOST', LagoonLogger::LAGOON_LOGS_DEFAULT_HOST),
];
$form['lagoon_logs_port'] = [
'#prefix' => '<div class="ll-settings-key-value">',
'#suffix' => '</div>',
'#markup' => t('Logstash port: ') . variable_get('LAGOON_LOGS_PORT', LagoonLogger::LAGOON_LOGS_DEFAULT_PORT),
];
$form['lagoon_logs_identifier'] = [
'#prefix' => '<div class="ll-settings-key-value">',
'#suffix' => '</div>',
'#markup' => t('Logstash leading identifier: ') . variable_get('LAGOON_LOGS_IDENTIFIER', LagoonLogger::LAGOON_LOGS_DEFAULT_IDENTIFIER),
];
return system_settings_form($form);
}