function views_handler_field_countries_continent::render in Countries 8
Same name and namespace in other branches
- 7.2 views/views_handler_field_countries_continent.inc \views_handler_field_countries_continent::render()
 
Render contient as human readable name or continent code
File
- views/
views_handler_field_countries_continent.inc, line 35  - Views module filter handler class.
 
Class
- views_handler_field_countries_continent
 - Provides a continent filter.
 
Code
function render($values) {
  $data = parent::render($values);
  if ($this->options['continent_code'] != 1 && $data !== NULL && $data !== '') {
    $continents = countries_get_continents();
    return $continents[$data];
  }
  return $data;
}