public function WeatherCurrentBlock::blockSubmit in Wunderground weather 8
Overrides BlockPluginTrait::blockSubmit
File
- src/
Plugin/ Block/ WeatherCurrentBlock.php, line 148 - Contains \Drupal\wunderground_weather\Plugin\Block\WeatherCurrentBlock.
Class
- WeatherCurrentBlock
- Provides a block with current weather conditions.
Namespace
Drupal\wunderground_weather\Plugin\BlockCode
public function blockSubmit($form, FormStateInterface $form_state) {
$this
->setConfigurationValue('location_current', $form_state
->getValue([
'location',
'location_current',
]));
$this
->setConfigurationValue('temperature_scale', $form_state
->getValue([
'temperature_scale',
]));
$this
->setConfigurationValue('windspeed_scale', $form_state
->getValue([
'windspeed_scale',
]));
$this
->setConfigurationValue('current_fields', $form_state
->getValue([
'current_fields',
]));
$this
->setConfigurationValue('icon_set', $form_state
->getValue([
'icon_set',
]));
}