Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a4dc8467
Commit
a4dc8467
authored
Apr 26, 2009
by
Dries
Browse files
- Patch
#368821
by Senpai, sun, JuliaKM: documentation improvements.
parent
f2cbf550
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/system/system.api.php
View file @
a4dc8467
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment