You are here

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

Overrides BlockPluginTrait::blockForm

File

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

Class

VIBlock
Provides a 'Visually Impaired' 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;
}