You are here

public function views_handler_argument_null::options_form in Views (for Drupal 7) 7.3

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

Override options_form() so that only the relevant options are displayed to the user.

Overrides views_handler_argument::options_form

File

handlers/views_handler_argument_null.inc, line 28
Definition of views_handler_argument_null.

Class

views_handler_argument_null
Argument handler that ignores the argument.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['must_not_be'] = array(
    '#type' => 'checkbox',
    '#title' => t('Fail basic validation if any argument is given'),
    '#default_value' => !empty($this->options['must_not_be']),
    '#description' => t('By checking this field, you can use this to make sure views with more arguments than necessary fail validation.'),
    '#fieldset' => 'more',
  );
  unset($form['exception']);
}