4e3de3bb4768cee8393df9c5be8b65c89f31066d
[yaffs-website] / web / core / modules / system / tests / modules / form_test / src / Form / FormTestButtonClassForm.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  * Builds a simple form to test form button classes.
10  */
11 class FormTestButtonClassForm extends FormBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getFormId() {
17     return 'form_test_button_class';
18   }
19
20   /**
21    * {@inheritdoc}
22    */
23   public function buildForm(array $form, FormStateInterface $form_state) {
24     $form['button'] = [
25       '#type' => 'button',
26       '#value' => 'test',
27       '#button_type' => 'foo',
28     ];
29     $form['delete'] = [
30       '#type' => 'button',
31       '#value' => 'Delete',
32       '#button_type' => 'danger',
33     ];
34     return $form;
35   }
36
37   /**
38    * {@inheritdoc}
39    */
40   public function submitForm(array &$form, FormStateInterface $form_state) {
41   }
42
43 }