public function weather_handler_pressure::render in Weather 7.3
Same name and namespace in other branches
- 7.2 views_handlers/weather_handler_pressure.inc \weather_handler_pressure::render()
Render pressure with selected unit.
Overrides views_handler_field_numeric::render
File
- views_handlers/
weather_handler_pressure.inc, line 64 - Views handler for weather module.
Class
- weather_handler_pressure
- Field handler to allow selection of pressure units.
Code
public function render($values) {
if (is_null($values->{$this->field_alias})) {
return;
}
$value = $values->{$this->field_alias};
module_load_include('inc', 'weather', 'weather_theme');
return weather_format_pressure($value, $this->options['unit']);
}