public function weather_handler_wind::options_form in Weather 7.3
Same name and namespace in other branches
- 7.2 views_handlers/weather_handler_wind.inc \weather_handler_wind::options_form()
Provide settings to select for wind formatting.
Overrides views_handler_field::options_form
File
- views_handlers/
weather_handler_wind.inc, line 50 - Views handler for weather module.
Class
- weather_handler_wind
- Field handler to render the wind condition.
Code
public function options_form(&$form, &$form_state) {
$form['wind_settings'] = array(
'#title' => t('Formatting of wind direction display'),
'#description' => t('Select formatting for wind directions.'),
'#type' => 'select',
'#default_value' => $this->options['wind_settings'],
'#options' => array(
'normal' => t('Normal text'),
'normal_degree' => t('Normal text with degree'),
'abbreviated' => t('Abbreviated text'),
'abbreviated_degree' => t('Abbreviated text with degree'),
),
);
$form['unit'] = array(
'#title' => t('Unit for wind speed display'),
'#description' => t('Select unit for formatted wind speeds.'),
'#type' => 'select',
'#default_value' => $this->options['unit'],
'#options' => array(
'kmh' => t('km/h'),
'mph' => t('mph'),
'knots' => t('Knots'),
'mps' => t('meter/s'),
'beaufort' => t('Beaufort'),
),
);
parent::options_form($form, $form_state);
}