You are here

function elasticsearch_watchdog_clear_log_form in Elasticsearch Connector 7.2

Same name and namespace in other branches
  1. 7.5 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_clear_log_form()
  2. 7 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_clear_log_form()

Form constructor for the form that clears out the log.

See also

elasticsearch_watchdog_clear_log_submit()

1 string reference to 'elasticsearch_watchdog_clear_log_form'
elasticsearch_watchdog_overview in modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc
Page callback: Displays a listing of log messages.

File

modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc, line 844
Created on Jan 06, 2014

Code

function elasticsearch_watchdog_clear_log_form($form) {
  $form['elasticsearch_watchdog_clear'] = array(
    '#type' => 'fieldset',
    '#title' => t('Clear log messages'),
    '#description' => t('This will permanently remove the log messages from the Elasticsearch index.'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['elasticsearch_watchdog_clear']['clear'] = array(
    '#type' => 'submit',
    '#value' => t('Clear log messages'),
    '#submit' => array(
      'elasticsearch_watchdog_clear_log_submit',
    ),
  );
  return $form;
}