Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / modules / form_test / src / Form / FormTestRangeInvalidForm.php
1 <?php
2
3 namespace Drupal\form_test\Form;
4
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
7
8 /**
9  * Form constructor for testing invalid #type 'range' elements.
10  */
11 class FormTestRangeInvalidForm extends FormBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getFormId() {
17     return 'form_test_range_invalid';
18   }
19
20   /**
21    * {@inheritdoc}
22    */
23   public function buildForm(array $form, FormStateInterface $form_state) {
24     $form['minmax'] = [
25       '#type' => 'range',
26       '#min' => 10,
27       '#max' => 5,
28       '#title' => 'Invalid range',
29       '#description' => 'Minimum greater than maximum.',
30     ];
31     $form['submit'] = [
32       '#type' => 'submit',
33       '#value' => 'Submit',
34     ];
35     return $form;
36   }
37
38   /**
39    * {@inheritdoc}
40    */
41   public function submitForm(array &$form, FormStateInterface $form_state) {
42   }
43
44 }