You are here

function views_plugin_style_watchdog_table::options_form in Views Watchdog 6

Same name and namespace in other branches
  1. 6.3 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_form()
  2. 6.2 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_form()
  3. 7.3 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_form()

File

views/plugins/views_plugin_style_watchdog_table.inc, line 27
Views callbacks for the "Views watchdog" module.

Class

views_plugin_style_watchdog_table

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['watchdog_table_severity'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add CSS classes to each table row based on severity level.'),
    '#default_value' => !empty($this->options['watchdog_table_severity']),
  );
  foreach (views_watchdog_get_severity() as $key => $value) {
    $form['watchdog_table_severity_' . $value['arg']] = array(
      '#type' => 'textfield',
      '#title' => $value['title'],
      '#description' => $value['text'],
      '#default_value' => $this->options['watchdog_table_severity_' . $value['arg']],
      '#process' => array(
        'views_process_dependency',
      ),
      '#dependency' => array(
        'edit-style-options-watchdog-table-severity' => array(
          1,
        ),
      ),
    );
  }
}