dblog_form_system_logging_settings_alter

dblog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state)

Implements hook_form_FORM_ID_alter() for system_logging_settings().

File

core/modules/dblog/dblog.module, line 97
System monitoring and logging for administrators.

Code

function dblog_form_system_logging_settings_alter(&$form, FormStateInterface $form_state) {
  $row_limits = array(100, 1000, 10000, 100000, 1000000);
  $form['dblog_row_limit'] = array(
    '#type' => 'select',
    '#title' => t('Database log messages to keep'),
    '#default_value' => \Drupal::configFactory()->getEditable('dblog.settings')->get('row_limit'),
    '#options' => array(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>.', array(':cron' => \Drupal::url('system.status')))
  );

  $form['#submit'][] = 'dblog_logging_settings_submit';
}
doc_Drupal
2016-10-29 09:01:19
Comments
Leave a Comment

Please login to continue.