Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/node/views_plugin_argument_default_node.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Contains the node from URL argument default plugin.
|
|
5 |
* Definition of views_plugin_argument_default_node.
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
9 |
* Default argument plugin to extract a node via menu_get_object |
|
9 |
* Default argument plugin to extract a node via menu_get_object.
|
|
10 | 10 |
* |
11 | 11 |
* This plugin actually has no options so it odes not need to do a great deal. |
12 | 12 |
*/ |
13 | 13 |
class views_plugin_argument_default_node extends views_plugin_argument_default { |
14 |
function get_argument() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function get_argument() { |
|
15 | 19 |
foreach (range(1, 3) as $i) { |
16 | 20 |
$node = menu_get_object('node', $i); |
17 | 21 |
if (!empty($node)) { |
... | ... | |
23 | 27 |
return arg(1); |
24 | 28 |
} |
25 | 29 |
} |
30 |
|
|
26 | 31 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules