summaryrefslogtreecommitdiffstatshomepage
path: root/core/includes/form.inc
diff options
context:
space:
mode:
Diffstat (limited to 'core/includes/form.inc')
-rw-r--r--core/includes/form.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/includes/form.inc b/core/includes/form.inc
index 8f03f772b74..d290b4f4495 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -43,18 +43,18 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
* presentation, while simplifying code and reducing the amount of HTML that
* must be explicitly generated by modules.
*
- * The primary function used with forms is drupal_get_form(), which is
- * used for forms presented interactively to a user. Forms can also be built and
- * submitted programmatically without any user input using the
+ * The primary function used with forms is \Drupal::formBuilder()->getForm(),
+ * which is used for forms presented interactively to a user. Forms can also be
+ * built and submitted programmatically without any user input using the
* drupal_form_submit() function.
*
- * drupal_get_form() handles retrieving, processing, and displaying a rendered
- * HTML form for modules automatically.
+ * \Drupal::formBuilder()->getForm() handles retrieving, processing, and
+ * displaying a rendered HTML form for modules automatically.
*
- * Here is an example of how to use drupal_get_form() and a form builder
- * function:
+ * Here is an example of how to use \Drupal::formBuilder()->getForm() and a
+ * form builder function:
* @code
- * $form = drupal_get_form('my_module_example_form');
+ * $form = \Drupal::formBuilder()->getForm('my_module_example_form');
* ...
* function my_module_example_form($form, &$form_state) {
* $form['submit'] = array(
@@ -74,7 +74,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
* Or with any number of additional arguments:
* @code
* $extra = "extra";
- * $form = drupal_get_form('my_module_example_form', $extra);
+ * $form = \Drupal::formBuilder()->getForm('my_module_example_form', $extra);
* ...
* function my_module_example_form($form, &$form_state, $extra) {
* $form['submit'] = array(