You are here

public function UserEmailVerificationNotificationBlock::blockForm in User email verification 8

Overrides BlockPluginTrait::blockForm

File

src/Plugin/Block/UserEmailVerificationNotificationBlock.php, line 98

Class

UserEmailVerificationNotificationBlock
Block to display 'You have to verify your Email' notification.

Namespace

Drupal\user_email_verification\Plugin\Block

Code

public function blockForm($form, FormStateInterface $form_state) {
  $form['notification'] = [
    '#title' => $this
      ->t('Notification message'),
    '#description' => $this
      ->t('Paste here a message with instructions which will notify a user to verify Email.'),
    '#type' => 'text_format',
    '#required' => TRUE,
    '#default_value' => $this->configuration['notification']['value'],
    '#format' => $this->configuration['notification']['format'],
  ];
  $form['token_tree'] = [
    '#theme' => 'token_tree_link',
  ];
  return $form;
}