Révision 5d12d676
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/views/modules/locale/views_handler_argument_locale_group.inc | ||
---|---|---|
2 | 2 |
|
3 | 3 |
/** |
4 | 4 |
* @file |
5 |
* Definition of views_handler_argument_locale_group.
|
|
5 |
* Contains .
|
|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
/** |
... | ... | |
11 | 11 |
* @ingroup views_argument_handlers |
12 | 12 |
*/ |
13 | 13 |
class views_handler_argument_locale_group extends views_handler_argument { |
14 |
function construct() { |
|
14 |
|
|
15 |
/** |
|
16 |
* {@inheritdoc} |
|
17 |
*/ |
|
18 |
public function construct() { |
|
15 | 19 |
parent::construct('group'); |
16 | 20 |
} |
17 | 21 |
|
... | ... | |
19 | 23 |
* Override the behavior of summary_name(). Get the user friendly version |
20 | 24 |
* of the group. |
21 | 25 |
*/ |
22 |
function summary_name($data) { |
|
26 |
public function summary_name($data) {
|
|
23 | 27 |
return $this->locale_group($data->{$this->name_alias}); |
24 | 28 |
} |
25 | 29 |
|
... | ... | |
27 | 31 |
* Override the behavior of title(). Get the user friendly version |
28 | 32 |
* of the language. |
29 | 33 |
*/ |
30 |
function title() { |
|
34 |
public function title() {
|
|
31 | 35 |
return $this->locale_group($this->argument); |
32 | 36 |
} |
33 | 37 |
|
34 |
function locale_group($group) { |
|
38 |
/** |
|
39 |
* {@inheritdoc} |
|
40 |
*/ |
|
41 |
public function locale_group($group) { |
|
35 | 42 |
$groups = module_invoke_all('locale', 'groups'); |
36 | 43 |
// Sort the list. |
37 | 44 |
asort($groups); |
38 | 45 |
return isset($groups[$group]) ? $groups[$group] : t('Unknown group'); |
39 | 46 |
} |
47 |
|
|
40 | 48 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules