summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/locale/views_handler_field_locale_group.inc
blob: 393a9487cfea35b9f9ff28deb22c2eb56578abb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php

/**
 * @file
 * Definition of views_handler_field_locale_group.
 */

/**
 * Field handler to translate a group into its readable form.
 *
 * @ingroup views_field_handlers
 */
class views_handler_field_locale_group extends views_handler_field {
  function render($values) {
    $groups = module_invoke_all('locale', 'groups');
    // Sort the list.
    asort($groups);
    $value = $this->get_value($values);
    return isset($groups[$value]) ? $groups[$value] : '';
  }
}