Version 1
[yaffs-website] / web / core / modules / system / tests / modules / form_test / src / Form / FormTestAlterForm.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 builder for testing hook_form_alter() and hook_form_FORM_ID_alter().
10  */
11 class FormTestAlterForm extends FormBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getFormId() {
17     return 'form_test_alter_form';
18   }
19
20   /**
21    * {@inheritdoc}
22    */
23   public function buildForm(array $form, FormStateInterface $form_state) {
24     // Elements can be added as needed for future testing needs, but for now,
25     // we're only testing alter hooks that do not require any elements added by
26     // this function.
27     return $form;
28   }
29
30   /**
31    * {@inheritdoc}
32    */
33   public function submitForm(array &$form, FormStateInterface $form_state) {
34   }
35
36 }