public function WeatherForecastBlock::blockSubmit in Wunderground weather 8
Overrides BlockPluginTrait::blockSubmit
File
- src/
Plugin/ Block/ WeatherForecastBlock.php, line 165 - Contains \Drupal\wunderground_weather\Plugin\Block\WeatherForecastBlock.
Class
- WeatherForecastBlock
- Provides a with a five day weather forecast.
Namespace
Drupal\wunderground_weather\Plugin\BlockCode
public function blockSubmit($form, FormStateInterface $form_state) {
$this
->setConfigurationValue('location_forecast', $form_state
->getValue([
'location',
'location_forecast',
]));
$this
->setConfigurationValue('temperature_scale', $form_state
->getValue([
'temperature_scale',
]));
$this
->setConfigurationValue('windspeed_scale', $form_state
->getValue([
'windspeed_scale',
]));
$this
->setConfigurationValue('forecast_fields', $form_state
->getValue([
'forecast_fields',
]));
$this
->setConfigurationValue('number_of_days', $form_state
->getValue([
'number_of_days',
]));
$this
->setConfigurationValue('icon_set', $form_state
->getValue([
'icon_set',
]));
}