You are here

public function WebformAnalysisBlock::blockSubmit in Webform Analysis 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/WebformAnalysisBlock.php, line 133

Class

WebformAnalysisBlock
Provides a 'Webform' block.

Namespace

Drupal\webform_analysis\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  parent::blockSubmit($form, $form_state);
  $settings = [
    'entity_id',
    'component',
    'chart_type',
  ];
  if (!$form_state
    ->getErrors()) {
    foreach ($settings as $setting) {
      $this->configuration[$setting] = $form_state
        ->getValue($setting);
    }
  }
}