Namespace
Drupal\user_language_test\Form
File
core/modules/user/tests/modules/user_language_test/src/Form/UserLanguageTestForm.php
View source
<?php
namespace Drupal\user_language_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
class UserLanguageTestForm extends FormBase {
public function getFormId() {
return 'user_language_test';
}
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;
}
public function submitForm(array &$form, FormStateInterface $form_state) {
}
}
Classes