You are here

public function NormalBlock::blockForm in Visually Impaired Support (module) 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/NormalBlock.php, line 76

Class

NormalBlock
Provides a 'Normal' Block.

Namespace

Drupal\visually_impaired_module\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $active = [
    0 => $this
      ->t('Text'),
    1 => $this
      ->t('Image'),
  ];
  $form['block_style'] = [
    '#type' => 'radios',
    '#title' => $this
      ->t('Block style'),
    '#required' => TRUE,
    '#options' => $active,
    '#default_value' => $this->configuration['block_style'],
  ];
  return $form;
}