You are here

public function DisclaimerEmailBlock::blockSubmit in Disclaimer 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/DisclaimerEmailBlock.php, line 196

Class

DisclaimerEmailBlock
Provides a 'DisclaimerEmailBlock' block.

Namespace

Drupal\disclaimer\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {

  /** @var \Drupal\Core\Form\SubformStateInterface $form_state */
  $this->configuration['machine_name'] = $form_state
    ->getCompleteFormState()
    ->getValue('id');
  $this->configuration['redirect'] = $form_state
    ->getValue('redirect');
  $this->configuration['max_age'] = $form_state
    ->getValue('max_age');
  $this->configuration['challenge'] = $form_state
    ->getValue('challenge');
  $this->configuration['allowed_emails'] = $form_state
    ->getValue('allowed_emails');
  $this->configuration['email_validation_fail'] = $form_state
    ->getValue('email_validation_fail');
  $this->configuration['disclaimer'] = $form_state
    ->getValue('disclaimer');
}