Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/plugins/views_plugin_argument_default_raw.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Contains the raw value argument default plugin.
|
|
5 |
* Definition of views_plugin_argument_default_raw.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
... | ... | |
11 | 11 |
* @ingroup views_argument_default_plugins |
12 | 12 |
*/ |
13 | 13 |
class views_plugin_argument_default_raw 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['index'] = array('default' => ''); |
17 | 21 |
$options['use_alias'] = array('default' => FALSE, 'bool' => TRUE); |
... | ... | |
19 | 23 |
return $options; |
20 | 24 |
} |
21 | 25 |
|
22 |
function options_form(&$form, &$form_state) { |
|
26 |
/** |
|
27 |
* {@inheritdoc} |
|
28 |
*/ |
|
29 |
public function options_form(&$form, &$form_state) { |
|
23 | 30 |
parent::options_form($form, $form_state); |
24 | 31 |
// Using range(1, 10) will create an array keyed 0-9, which allows arg() to |
25 | 32 |
// properly function since it is also zero-based. |
... | ... | |
38 | 45 |
); |
39 | 46 |
} |
40 | 47 |
|
41 |
function get_argument() { |
|
48 |
/** |
|
49 |
* {@inheritdoc} |
|
50 |
*/ |
|
51 |
public function get_argument() { |
|
42 | 52 |
$path = NULL; |
43 | 53 |
if ($this->options['use_alias']) { |
44 | 54 |
$path = drupal_get_path_alias(); |
... | ... | |
47 | 57 |
return $arg; |
48 | 58 |
} |
49 | 59 |
} |
60 |
|
|
50 | 61 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules