You are here

public function PrevNextBlock::blockSubmit in Previous/Next API 8.2

Overrides BlockPluginTrait::blockSubmit

File

src/Plugin/Block/PrevNextBlock.php, line 143

Class

PrevNextBlock
Provides a 'Previous Next' block.

Namespace

Drupal\prev_next\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $previous_settings = $form_state
    ->getValue('previous');
  foreach ($previous_settings as $key => $value) {
    $this
      ->setConfigurationValue($key, $value);
  }
  $next_settings = $form_state
    ->getValue('next');
  foreach ($next_settings as $key => $value) {
    $this
      ->setConfigurationValue($key, $value);
  }
}