Updated to Drupal 8.5. Core Media not yet in use.
[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  * @internal
12  */
13 class FormTestButtonClassForm extends FormBase {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function getFormId() {
19     return 'form_test_button_class';
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   public function buildForm(array $form, FormStateInterface $form_state) {
26     $form['button'] = [
27       '#type' => 'button',
28       '#value' => 'test',
29       '#button_type' => 'foo',
30     ];
31     $form['delete'] = [
32       '#type' => 'button',
33       '#value' => 'Delete',
34       '#button_type' => 'danger',
35     ];
36     return $form;
37   }
38
39   /**
40    * {@inheritdoc}
41    */
42   public function submitForm(array &$form, FormStateInterface $form_state) {
43   }
44
45 }