public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form['subject'] = [
      '#type' => 'textfield',
      '#title' => t('Subject'),
      '#required' => TRUE,
      '#default_value' => $form_state->getValue('subject'),
      '#maxlength' => '254',
    ];

    $form['message'] = [
      '#type' => 'textarea',
      '#title' => t('Message'),
      '#required' => TRUE,
      '#default_value' => $form_state->getValue('message'),
      '#cols' => '80',
      '#rows' => '20',
    ];

    $selected_count = $this->context['selected_count'];
    $form['#title'] = $this->t('Send an email to :selected_count members', [':selected_count' => $selected_count]);
    if (isset($form['list'])) {
      unset($form['list']);
    }
    $form['actions']['submit']['#value'] = $this->t('Send email');
    $form['actions']['submit']['#attributes']['class'] = ['button button--primary js-form-submit form-submit btn js-form-submit btn-raised btn-primary waves-effect waves-btn waves-light'];
    $form['actions']['cancel']['#attributes']['class'] = ['button button--danger btn btn-flat waves-effect waves-btn'];
    return $form;
  }
public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form['subject'] = [
      '#type' => 'textfield',
      '#title' => t('Subject'),
      '#required' => TRUE,
      '#default_value' => $form_state->getValue('subject'),
      '#maxlength' => '254',
    ];

    $form['message'] = [
      '#type' => 'textarea',
      '#title' => t('Message'),
      '#required' => TRUE,
      '#default_value' => $form_state->getValue('message'),
      '#cols' => '80',
      '#rows' => '20',
    ];

    $selected_count = $this->context['selected_count'];
    $form['#title'] = $this->t('Send an email to :selected_count members', [':selected_count' => $selected_count]);
    if (isset($form['list'])) {
      unset($form['list']);
    }
    $form['actions']['submit']['#value'] = $this->t('Send email');
    $form['actions']['submit']['#attributes']['class'] = ['button button--primary js-form-submit form-submit btn js-form-submit btn-raised btn-primary waves-effect waves-btn waves-light'];
    $form['actions']['cancel']['#attributes']['class'] = ['button button--danger btn btn-flat waves-effect waves-btn'];
    return $form;
  }
public function buildConfigurationForm ( array $ form , FormStateInterface $ form_state ) { $ form [ 'subject' ] = [ '#type' => 'textfield' , '#title' => t ( 'Subject' ) , '#required' => TRUE , '#default_value' => $ form_state -> getValue ( 'subject' ) , '#maxlength' => '254' , ] ; $ form [ 'message' ] = [ '#type' => 'textarea' , '#title' => t ( 'Message' ) , '#required' => TRUE , '#default_value' => $ form_state -> getValue ( 'message' ) , '#cols' => '80' , '#rows' => '20' , ] ; $ selected_count = $ this -> context [ 'selected_count' ] ; $ form [ '#title' ] = $ this -> t ( 'Send an email to :selected_count members' , [ ':selected_count' => $ selected_count ] ) ; if ( isset ( $ form [ 'list' ] ) ) { unset ( $ form [ 'list' ] ) ; } $ form [ 'actions' ] [ 'submit' ] [ '#value' ] = $ this -> t ( 'Send email' ) ; $ form [ 'actions' ] [ 'submit' ] [ '#attributes' ] [ 'class' ] = [ 'button button--primary js-form-submit form-submit btn js-form-submit btn-raised btn-primary waves-effect waves-btn waves-light' ] ; $ form [ 'actions' ] [ 'cancel' ] [ '#attributes' ] [ 'class' ] = [ 'button button--danger btn btn-flat waves-effect waves-btn' ] ; return $ form ; }
Configuration form builder.

If this method has implementation, the action is
considered to be configurable.

@param array $form
Form array.
@param \Drupal\Core\Form\FormStateInterface $form_state
The form state object.

@return array
The configuration form.
Configuration form builder .