You are here

function views_handler_field_watchdog_severity::options_form in Views Watchdog 6

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

File

views/handlers/views_handler_field_watchdog_severity.inc, line 26
Views callbacks for the "Views watchdog" module.

Class

views_handler_field_watchdog_severity

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['watchdog_severity_icon'] = array(
    '#title' => t('Display severity level as icon'),
    '#type' => 'checkbox',
    '#default_value' => !empty($this->options['watchdog_severity_icon']),
  );
  foreach (views_watchdog_get_severity() as $key => $value) {
    $form['watchdog_severity_icon_' . $value['arg']] = array(
      '#type' => 'textfield',
      '#title' => $value['title'],
      '#description' => t('The path to the image file you would like to use as icon.'),
      '#default_value' => $this->options['watchdog_severity_icon_' . $value['arg']],
      '#process' => array(
        'views_process_dependency',
      ),
      '#dependency' => array(
        'edit-options-watchdog-severity-icon' => array(
          1,
        ),
      ),
    );
  }
}