You are here

public function RRSSBBlock::blockForm in Ridiculously Responsive Social Sharing Buttons 8.2

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/RRSSBBlock.php, line 37

Class

RRSSBBlock
Provides a 'RRSSB form' block.

Namespace

Drupal\rrssb\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form = parent::blockForm($form, $form_state);
  $config = $this
    ->getConfiguration();
  $form['button_set'] = [
    '#type' => 'select',
    '#title' => $this
      ->t('Button set'),
    '#options' => rrssb_button_set_names(),
    '#description' => $this
      ->t('Select RRSSB button set to display.'),
    '#default_value' => isset($config['button_set']) ? $config['button_set'] : '',
  ];
  return $form;
}