public function BlockWithAlteredSettings::blockForm in Panopoly 8.2
Overrides BlockPluginTrait::blockForm
File
- modules/
panopoly/ panopoly_magic/ 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\BlockCode
public function blockForm($form, FormStateInterface $form_state) {
$config = $this
->getConfiguration();
$form['message'] = [
'#type' => 'textfield',
'#title' => $this
->t('Message'),
'#default_value' => $config['message'],
];
return $form;
}