You are here

public function BlockWithAlteredSettings::blockSubmit in Panopoly Magic 8.2

Overrides BlockPluginTrait::blockSubmit

File

tests/modules/panopoly_magic_preview_test/src/Plugin/Block/BlockWithAlteredSettings.php, line 46

Class

BlockWithAlteredSettings
A block that takes a setting that'll be displayed.

Namespace

Drupal\panopoly_magic_preview_test\Plugin\Block

Code

public function blockSubmit($form, FormStateInterface $form_state) {
  $config = $this
    ->getConfiguration();
  $config['message'] = $form_state
    ->getValue('message');
  $this
    ->setConfiguration($config);
}