Go to the documentation of this file.00001 <?php
00010 class views_plugin_argument_default_raw extends views_plugin_argument_default {
00011 function option_definition() {
00012 $options = parent::option_definition();
00013 $options['index'] = array('default' => '');
00014
00015 return $options;
00016 }
00017
00018 function options_form(&$form, &$form_state) {
00019 parent::options_form($form, $form_state);
00020
00021
00022 $form['index'] = array(
00023 '#type' => 'select',
00024 '#title' => t('Path component'),
00025 '#default_value' => $this->options['index'],
00026 '#options' => range(1, 10),
00027 '#description' => t('The numbering starts from 1, e.g. on the page admin/structure/types, the 3rd path component is "types".'),
00028 );
00029 }
00030
00031 function get_argument() {
00032 if ($arg = arg($this->options['index'])) {
00033 return $arg;
00034 }
00035 }
00036 }