You are here

function views_plugin_style_watchdog_table::options_form in Views Watchdog 7.3

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 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_form()
  3. 6.2 views/plugins/views_plugin_style_watchdog_table.inc \views_plugin_style_watchdog_table::options_form()

Render the given style.

Overrides views_plugin_style_table::options_form

File

views/plugins/views_plugin_style_watchdog_table.inc, line 33
Views style plugin for the views_watchdog module.

Class

views_plugin_style_watchdog_table
Provides style options for watchdog tables.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['watchdog_table_type'] = array(
    '#type' => 'checkbox',
    '#title' => t('Add CSS classes to each table row based on type.'),
    '#default_value' => !empty($this->options['watchdog_table_type']),
  );
  $form['watchdog_table_type_class'] = array(
    '#type' => 'textfield',
    '#title' => t('Type class'),
    '#description' => t('The CSS class to apply to the row. Replacement patterns: [type]'),
    '#default_value' => !empty($this->options['watchdog_table_type_class']) ? $this->options['watchdog_table_type_class'] : 'dblog-[type]',
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-style-options-watchdog-table-type' => array(
        1,
      ),
    ),
  );
  $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']),
  );
  $form['watchdog_table_severity_class'] = array(
    '#type' => 'textfield',
    '#title' => t('Severity class'),
    '#description' => t('The CSS class to apply to the row. Replacement patterns: [severity]'),
    '#default_value' => !empty($this->options['watchdog_table_severity_class']) ? $this->options['watchdog_table_severity_class'] : 'dblog-[severity]',
    '#process' => array(
      'ctools_dependent_process',
    ),
    '#dependency' => array(
      'edit-style-options-watchdog-table-severity' => array(
        1,
      ),
    ),
  );
}