Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/node/views_handler_argument_node_language.inc | ||
---|---|---|
9 | 9 |
* Argument handler to accept a language. |
10 | 10 |
*/ |
11 | 11 |
class views_handler_argument_node_language extends views_handler_argument { |
12 |
function construct() { |
|
12 |
|
|
13 |
/** |
|
14 |
* {@inheritdoc} |
|
15 |
*/ |
|
16 |
public function construct() { |
|
13 | 17 |
parent::construct('language'); |
14 | 18 |
} |
15 | 19 |
|
... | ... | |
17 | 21 |
* Override the behavior of summary_name(). Get the user friendly version |
18 | 22 |
* of the language. |
19 | 23 |
*/ |
20 |
function summary_name($data) { |
|
24 |
public function summary_name($data) {
|
|
21 | 25 |
return $this->node_language($data->{$this->name_alias}); |
22 | 26 |
} |
23 | 27 |
|
... | ... | |
25 | 29 |
* Override the behavior of title(). Get the user friendly version of the |
26 | 30 |
* node type. |
27 | 31 |
*/ |
28 |
function title() { |
|
32 |
public function title() {
|
|
29 | 33 |
return $this->node_language($this->argument); |
30 | 34 |
} |
31 | 35 |
|
32 |
function node_language($langcode) { |
|
36 |
/** |
|
37 |
* |
|
38 |
*/ |
|
39 |
public function node_language($langcode) { |
|
33 | 40 |
$languages = views_language_list(); |
34 | 41 |
return isset($languages[$langcode]) ? $languages[$langcode] : t('Unknown language'); |
35 | 42 |
} |
43 |
|
|
36 | 44 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules