00001 <?php 00010 class views_plugin_argument_default_fixed extends views_plugin_argument_default { 00011 function option_definition() { 00012 $options = parent::option_definition(); 00013 $options['argument'] = array('default' => ''); 00014 00015 return $options; 00016 } 00017 00018 function options_form(&$form, &$form_state) { 00019 parent::options_form($form, $form_state); 00020 $form['argument'] = array( 00021 '#type' => 'textfield', 00022 '#title' => t('Fixed value'), 00023 '#default_value' => $this->options['argument'], 00024 ); 00025 } 00026 00030 function get_argument() { 00031 return $this->options['argument']; 00032 } 00033 00034 function convert_options(&$options) { 00035 if (!isset($options['argument']) && isset($this->argument->options['default_argument_fixed'])) { 00036 $options['argument'] = $this->argument->options['default_argument_fixed']; 00037 } 00038 } 00039 } 00040