Commit a4dc8467 authored by Dries's avatar Dries
Browse files

- Patch #368821 by Senpai, sun, JuliaKM: documentation improvements.

parent f2cbf550
...@@ -313,10 +313,14 @@ function hook_form_FORM_ID_alter(&$form, &$form_state) { ...@@ -313,10 +313,14 @@ function hook_form_FORM_ID_alter(&$form, &$form_state) {
* See node_forms() for an actual example of how multiple forms share a common * See node_forms() for an actual example of how multiple forms share a common
* building function. * building function.
* *
* @param $form_id
* The unique string identifying the desired form.
* @param $args
* An array containing the original arguments provided to drupal_get_form().
* @return * @return
* An array keyed by form id with callbacks and optional, callback arguments. * An array keyed by form_id with callbacks and optional, callback arguments.
*/ */
function hook_forms() { function hook_forms($form_id, $args) {
$forms['mymodule_first_form'] = array( $forms['mymodule_first_form'] = array(
'callback' => 'mymodule_form_builder', 'callback' => 'mymodule_form_builder',
'callback arguments' => array('some parameter'), 'callback arguments' => array('some parameter'),
...@@ -324,6 +328,7 @@ function hook_forms() { ...@@ -324,6 +328,7 @@ function hook_forms() {
$forms['mymodule_second_form'] = array( $forms['mymodule_second_form'] = array(
'callback' => 'mymodule_form_builder', 'callback' => 'mymodule_form_builder',
); );
return $forms; return $forms;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment