You are here

public function WeatherHourlyBlock::blockSubmit in Wunderground weather 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/WeatherHourlyBlock.php, line 161
Contains \Drupal\wunderground_weather\Plugin\Block\WeatherHourlyBlock.

Class

WeatherHourlyBlock
Provides a with an hourly weather forecast.

Namespace

Drupal\wunderground_weather\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this
    ->setConfigurationValue('location', $form_state
    ->getValue([
    'location',
    'location',
  ]));
  $this
    ->setConfigurationValue('temperature_scale', $form_state
    ->getValue([
    'temperature_scale',
  ]));
  $this
    ->setConfigurationValue('windspeed_scale', $form_state
    ->getValue([
    'windspeed_scale',
  ]));
  $this
    ->setConfigurationValue('used_fields', $form_state
    ->getValue([
    'used_fields',
  ]));
  $this
    ->setConfigurationValue('number_of_hours', $form_state
    ->getValue([
    'number_of_hours',
  ]));
  $this
    ->setConfigurationValue('icon_set', $form_state
    ->getValue([
    'icon_set',
  ]));
}