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

/**
 * 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] : '';
  }
}