FormTestTableSelectMultipleFalseForm.php
Same filename in other branches
Namespace
Drupal\form_test\FormFile
-
core/
modules/ system/ tests/ modules/ form_test/ src/ Form/ FormTestTableSelectMultipleFalseForm.php
View source
<?php
namespace Drupal\form_test\Form;
use Drupal\Core\Form\FormStateInterface;
/**
* Builds a form to test table select with '#multiple" set to FALSE.
*
* @internal
*/
class FormTestTableSelectMultipleFalseForm extends FormTestTableSelectFormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return '_form_test_tableselect_multiple_false_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
return $this->tableselectFormBuilder($form, $form_state, [
'#multiple' => FALSE,
]);
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->messenger()
->addStatus($this->t('Submitted: @value', [
'@value' => $form_state->getValue('tableselect'),
]));
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
FormTestTableSelectMultipleFalseForm | Builds a form to test table select with '#multiple" set to FALSE. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.