source: sipes/modules_contrib/views/plugins/views_plugin_argument_default_fixed.inc @ 65dadeb

stableversion-3.0
Last change on this file since 65dadeb was 65dadeb, checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago

se agregaron los archivos de la nueva version del modulo

  • Propiedad mode establecida a 100644
File size: 938 octetos
Línea 
1<?php
2/**
3 * @file
4 * Contains the fixed argument default plugin.
5 */
6
7/**
8 * The fixed argument default handler.
9 */
10class views_plugin_argument_default_fixed extends views_plugin_argument_default {
11  function option_definition() {
12    $options = parent::option_definition();
13    $options['argument'] = array('default' => '');
14
15    return $options;
16  }
17
18  function options_form(&$form, &$form_state) {
19    $form['argument'] = array(
20      '#type' => 'textfield',
21      '#title' => t('Default argument'),
22      '#default_value' => $this->options['argument'],
23    );
24  }
25
26  /**
27   * Return the default argument.
28   */
29  function get_argument() {
30    return $this->options['argument'];
31  }
32
33  function convert_options(&$options) {
34    if (!isset($options['argument']) && isset($this->argument->options['default_argument_fixed'])) {
35      $options['argument'] = $this->argument->options['default_argument_fixed'];
36    }
37  }
38}
39
40/**
41 * @}
42 */
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.