You are here

public function WelcomeUserNameBlock::blockForm in Welcome Username 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/WelcomeUserNameBlock.php, line 100

Class

WelcomeUserNameBlock
Provides a 'Welcome Username Login/Logout' Block.

Namespace

Drupal\welcome_username\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form = parent::blockForm($form, $form_state);
  $form['welcome_username_welcome_string'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Welcome String'),
    '#default_value' => $this->configuration['welcome_username_welcome_string'],
  ];
  $form['welcome_username_logout_string'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Logout String'),
    '#default_value' => $this->configuration['welcome_username_logout_string'],
  ];
  return $form;
}