function 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';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!dblog!dblog.module/function/dblog_form_system_logging_settings_alter/8.1.x