UserLanguageTestForm.php

Same filename and directory in other branches
  1. 10 core/modules/user/tests/modules/user_language_test/src/Form/UserLanguageTestForm.php

Namespace

Drupal\user_language_test\Form

File

core/modules/user/tests/modules/user_language_test/src/Form/UserLanguageTestForm.php

View source
<?php

declare (strict_types=1);
namespace Drupal\user_language_test\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;

/**
 * Provides a User Language Test form.
 */
class UserLanguageTestForm extends FormBase {
  
  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'user_language_test';
  }
  
  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['#action'] = Url::fromRoute('user_language_test.post_response')->toString();
    $form['actions'] = [
      '#type' => 'actions',
      'submit' => [
        '#type' => 'submit',
        '#value' => $this->t('Send'),
      ],
    ];
    return $form;
  }
  
  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
  }

}

Classes

Title Deprecated Summary
UserLanguageTestForm Provides a User Language Test form.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.