Skip to content

Commit 88abab5

Browse files
metzlerdpaul-m
metzlerd
authored andcommitted
Issue #2686585 by metzlerd: Ensure fapi_example module has @defgroup and @addtogroup
1 parent c39e883 commit 88abab5

File tree

3 files changed

+43
-2
lines changed

3 files changed

+43
-2
lines changed

fapi_example/fapi_example.module

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* Example forms using the Forms API.
6+
*/
7+
8+
/**
9+
* @defgroup fapi_example Example: Forms API
10+
* @ingroup examples
11+
* @{
12+
* Examples using Forms API.
13+
*
14+
* Creating A Drupal Form requires:
15+
* - Creating a class that extends \Drupal\Core\Form\FormBase or
16+
* \Drupal\Core\Form\ConfigFormBase
17+
* - \Drupal\fapi_example\Form\SimpleForm
18+
* - Register the route to the form or invoke using
19+
* \Drupal::formBuilder()->getForm()
20+
* - fapi_example.routing.yml
21+
*
22+
* In addition to the simple example described above this module provides
23+
* examples that demonstrate:
24+
* - The order of execution of form controller methods
25+
* - \Drupal\fapi_example\Form\BuildDemo
26+
* - Populating a portion on a form with Ajax callbacks
27+
* - \Drupal\fapi_example\Form\AjaxDemo
28+
* - Container elements used to group items
29+
* - \Drupal\fapi_example\Form\ContainerDemo
30+
* - Elements used for data input
31+
* - \Drupal\fapi_example\Form\InputDemo
32+
* - Modal form creation
33+
* - \Drupal\fapi_example\Controller\Page
34+
* - \Drupal\fapi_example\Form\ModalForm
35+
* - Hiding elements based on the state of other elements
36+
* - \Drupal\fapi_example\Form\StateDemo
37+
* - Vertical Tabs elements in forms
38+
* - \Drupal\fapi_example\Form\VerticalTabsDemo
39+
*
40+
* @} End of "defgroup field_example".
41+
*/

fapi_example/src/Form/ModalForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
7171
}
7272

7373
/**
74-
* Implements the sumbit handler for the ajax call.
74+
* Implements the submit handler for the ajax call.
7575
*
7676
* @param array $form
7777
* Render array representing from.

fapi_example/src/Form/StateDemo.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* This example demonstrates using the #state property to bind the visibility of
1111
* a form element to the value of another element in the form. In the example,
12-
* when the user checks the "Need Special Accomodation" checkbox, additional
12+
* when the user checks the "Need Special Accommodation" checkbox, additional
1313
* form elements are made visible.
1414
*
1515
* The submit handler for this form is implemented by the

0 commit comments

Comments
 (0)