You are here

public function TwitterBlock::blockSubmit in Twitter Block 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/Block/TwitterBlock.php \Drupal\twitter_block\Plugin\Block\TwitterBlock::blockSubmit()

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/TwitterBlock.php, line 184

Class

TwitterBlock
Defines a twitter block block type.

Namespace

Drupal\twitter_block\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $this
    ->setConfigurationValue('widget_id', $form_state
    ->getValue('widget_id'));
  foreach ([
    'appearance',
    'functionality',
    'size',
    'accessibility',
  ] as $fieldset) {
    $fieldset_values = $form_state
      ->getValue($fieldset);
    foreach ($fieldset_values as $key => $value) {
      $this
        ->setConfigurationValue($key, $value);
    }
  }
}