Updated to Drupal 8.5. Core Media not yet in use.
[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  * @internal
12  */
13 class FormTestRangeInvalidForm extends FormBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function getFormId() {
19     return 'form_test_range_invalid';
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   public function buildForm(array $form, FormStateInterface $form_state) {
26     $form['minmax'] = [
27       '#type' => 'range',
28       '#min' => 10,
29       '#max' => 5,
30       '#title' => 'Invalid range',
31       '#description' => 'Minimum greater than maximum.',
32     ];
33     $form['submit'] = [
34       '#type' => 'submit',
35       '#value' => 'Submit',
36     ];
37     return $form;
38   }
39
40   /**
41    * {@inheritdoc}
42    */
43   public function submitForm(array &$form, FormStateInterface $form_state) {
44   }
45
46 }