Projet

Général

Profil

Paste
Télécharger (519 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / modules / locale / views_handler_field_locale_group.inc @ 4003efde

1
<?php
2

    
3
/**
4
 * @file
5
 * Definition of views_handler_field_locale_group.
6
 */
7

    
8
/**
9
 * Field handler to translate a group into its readable form.
10
 *
11
 * @ingroup views_field_handlers
12
 */
13
class views_handler_field_locale_group extends views_handler_field {
14

    
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function render($values) {
19
    $groups = module_invoke_all('locale', 'groups');
20
    // Sort the list.
21
    asort($groups);
22
    $value = $this->get_value($values);
23
    return isset($groups[$value]) ? $groups[$value] : '';
24
  }
25

    
26
}