Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/plugins/views_plugin_argument_default_fixed.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Contains the fixed argument default plugin.
|
|
5 |
* Definition of views_plugin_argument_default_fixed.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
... | ... | |
11 | 11 |
* @ingroup views_argument_default_plugins |
12 | 12 |
*/ |
13 | 13 |
class views_plugin_argument_default_fixed extends views_plugin_argument_default { |
14 |
function option_definition() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function option_definition() { |
|
15 | 19 |
$options = parent::option_definition(); |
16 | 20 |
$options['argument'] = array('default' => ''); |
17 | 21 |
|
18 | 22 |
return $options; |
19 | 23 |
} |
20 | 24 |
|
21 |
function options_form(&$form, &$form_state) { |
|
25 |
/** |
|
26 |
* {@inheritdoc} |
|
27 |
*/ |
|
28 |
public function options_form(&$form, &$form_state) { |
|
22 | 29 |
parent::options_form($form, $form_state); |
23 | 30 |
$form['argument'] = array( |
24 | 31 |
'#type' => 'textfield', |
... | ... | |
30 | 37 |
/** |
31 | 38 |
* Return the default argument. |
32 | 39 |
*/ |
33 |
function get_argument() { |
|
40 |
public function get_argument() {
|
|
34 | 41 |
return $this->options['argument']; |
35 | 42 |
} |
36 | 43 |
|
37 |
function convert_options(&$options) { |
|
44 |
/** |
|
45 |
* {@inheritdoc} |
|
46 |
*/ |
|
47 |
public function convert_options(&$options) { |
|
38 | 48 |
if (!isset($options['argument']) && isset($this->argument->options['default_argument_fixed'])) { |
39 | 49 |
$options['argument'] = $this->argument->options['default_argument_fixed']; |
40 | 50 |
} |
41 | 51 |
} |
52 |
|
|
42 | 53 |
} |
43 | 54 |
|
44 | 55 |
/** |
Formats disponibles : Unified diff
Weekly update of contrib modules