Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / modules / form_test / src / Form / FormTestTableForm.php
1 <?php
2
3 namespace Drupal\form_test\Form;
4
5 use Drupal\Core\Form\FormStateInterface;
6
7 class FormTestTableForm extends FormTestTableSelectFormBase {
8
9   /**
10    * {@inheritdoc}
11    */
12   public function getFormId() {
13     return '_form_test_table_form';
14   }
15
16   /**
17    * {@inheritdoc}
18    */
19   public function buildForm(array $form, FormStateInterface $form_state) {
20     $form['table'] = [
21       '#type' => 'table',
22       '#tableselect' => TRUE,
23       '#empty' => $this->t('Empty text.'),
24     ];
25     $form['table']['row'] = [
26       'data' => [
27         '#title' => '<em>kitten</em>',
28         '#markup' => '<p>some text</p>',
29       ],
30     ];
31     $form['table']['another_row'] = [
32       'data' => [
33         '#title' => $this->t('my favourite fruit is <strong>@fruit</strong>', ['@fruit' => 'bananas']),
34         '#markup' => '<p>some more text</p>',
35       ],
36     ];
37
38     return $form;
39   }
40
41   /**
42    * {@inheritdoc}
43    */
44   public function submitForm(array &$form, FormStateInterface $form_state) {
45   }
46
47 }