You are here

function mongodb_watchdog_clear_log_form in MongoDB 6

Same name and namespace in other branches
  1. 7 mongodb_watchdog/mongodb_watchdog.admin.inc \mongodb_watchdog_clear_log_form()

Return form for mongodb_watchdog clear button.

Return value

array A form array.

See also

dblog_clear_log_submit()

1 call to mongodb_watchdog_clear_log_form()
mongodb_watchdog_overview in mongodb_watchdog/mongodb_watchdog.admin.inc
Display watchdogs entries in MongoDB.

File

mongodb_watchdog/mongodb_watchdog.admin.inc, line 380
Settings for mongodb. Moved back to module file.

Code

function mongodb_watchdog_clear_log_form($form_state = array()) {
  $form = array();
  $form['mongodb_watchdog_clear'] = array(
    '#type' => 'fieldset',
    '#title' => t('Clear log messages'),
    '#description' => t('This will permanently remove the log messages from the database.'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['mongodb_watchdog_clear']['clear'] = array(
    '#type' => 'submit',
    '#value' => t('Clear log messages'),
    '#submit' => array(
      'mongodb_watchdog_clear_log_submit',
    ),
  );
  return $form;
}