You are here

function views_plugin_argument_default_raw::options_form in Views (for Drupal 7) 6.3

Same name and namespace in other branches
  1. 7.3 plugins/views_plugin_argument_default_raw.inc \views_plugin_argument_default_raw::options_form()

Provide the default form for setting options.

Overrides views_plugin_argument_default::options_form

File

plugins/views_plugin_argument_default_raw.inc, line 18
Contains the raw value argument default plugin.

Class

views_plugin_argument_default_raw
Default argument plugin to use the raw value from the URL.

Code

function options_form(&$form, &$form_state) {

  // Using range(1, 10) will create an array keyed 0-9, which allows arg() to
  // properly function since it is also zero-based.
  $form['index'] = array(
    '#type' => 'select',
    '#title' => t('Path component'),
    '#default_value' => $this->options['index'],
    '#options' => range(1, 10),
    '#description' => t('The numbering starts from 1, e.g. on the page admin/structure/types, the 3rd path component is "types".'),
  );
}