You are here

public function BlockWithAlteredSettings::blockForm in Panopoly Magic 8.2

Overrides BlockPluginTrait::blockForm

File

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

Class

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

Namespace

Drupal\panopoly_magic_preview_test\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $config = $this
    ->getConfiguration();
  $form['message'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Message'),
    '#default_value' => $config['message'],
  ];
  return $form;
}