public function weather_handler_wind_speed::options_form in Weather 7.3
Same name and namespace in other branches
- 7.2 views_handlers/weather_handler_wind_speed.inc \weather_handler_wind_speed::options_form()
Provide units to select for wind speed.
Overrides views_handler_field::options_form
File
- views_handlers/
weather_handler_wind_speed.inc, line 41 - Views handler for weather module.
Class
- weather_handler_wind_speed
- Field handler to render the wind speed.
Code
public function options_form(&$form, &$form_state) {
$form['unit'] = array(
'#title' => t('Unit for wind speed display'),
'#description' => t('Select unit for formatted wind speeds or display only value.'),
'#type' => 'select',
'#default_value' => $this->options['unit'],
'#options' => array(
'kmh' => t('km/h'),
'kmh_value' => t('km/h (only value)'),
'mph' => t('mph'),
'mph_value' => t('mph (only value)'),
'knots' => t('Knots'),
'knots_value' => t('Knots (only value)'),
'mps' => t('meter/s'),
'mps_value' => t('meter/s (only value)'),
'beaufort' => t('Beaufort'),
'beaufort_value' => t('Beaufort (only value)'),
),
);
parent::options_form($form, $form_state);
}