You are here

public function DisclaimerBlock::blockSubmit in Disclaimer 8

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/DisclaimerBlock.php, line 186

Class

DisclaimerBlock
Provides a 'DisclaimerBlock' 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['agree'] = $form_state
    ->getValue('agree');
  $this->configuration['disagree'] = $form_state
    ->getValue('disagree');
  $this->configuration['disclaimer'] = $form_state
    ->getValue('disclaimer');
}