31db2ebf385bb947f1961f6af6a8f85a660ef445
[yaffs-website] / web / core / modules / system / tests / modules / form_test / src / Form / FormTestTableSelectMultipleFalseForm.php
1 <?php
2
3 namespace Drupal\form_test\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6
7 /**
8  * Builds a form to test table select with '#multiple" set to FALSE.
9  *
10  * @internal
11  */
12 class FormTestTableSelectMultipleFalseForm extends FormTestTableSelectFormBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function getFormId() {
18     return '_form_test_tableselect_multiple_false_form';
19   }
20
21   /**
22    * {@inheritdoc}
23    */
24   public function buildForm(array $form, FormStateInterface $form_state) {
25     return $this->tableselectFormBuilder($form, $form_state, ['#multiple' => FALSE]);
26   }
27
28   /**
29    * {@inheritdoc}
30    */
31   public function submitForm(array &$form, FormStateInterface $form_state) {
32     $this->messenger()->addStatus($this->t('Submitted: @value', ['@value' => $form_state->getValue('tableselect')]));
33   }
34
35 }