function dblog_form_system_logging_settings_alter
Same name in other branches
- 7.x modules/dblog/dblog.module \dblog_form_system_logging_settings_alter()
- 9 core/modules/dblog/dblog.module \dblog_form_system_logging_settings_alter()
- 10 core/modules/dblog/dblog.module \dblog_form_system_logging_settings_alter()
Implements hook_form_FORM_ID_alter() for system_logging_settings().
File
-
core/
modules/ dblog/ dblog.module, line 101
Code
function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) {
$row_limits = [
100,
1000,
10000,
100000,
1000000,
];
$form['dblog_row_limit'] = [
'#type' => 'select',
'#title' => t('Database log messages to keep'),
'#default_value' => \Drupal::configFactory()->getEditable('dblog.settings')
->get('row_limit'),
'#options' => [
0 => t('All'),
] + array_combine($row_limits, $row_limits),
'#description' => t('The maximum number of messages to keep in the database log. Requires a <a href=":cron">cron maintenance task</a>.', [
':cron' => Url::fromRoute('system.status')->toString(),
]),
];
$form['#submit'][] = 'dblog_logging_settings_submit';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.