Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
5144743a
Commit
5144743a
authored
14 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#930566
by Benjamin Melançon: Clarify hook_help() documentation for dealing with wildcards.
parent
d63aef07
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/help/help.api.php
+16
-16
16 additions, 16 deletions
modules/help/help.api.php
with
16 additions
and
16 deletions
modules/help/help.api.php
+
16
−
16
View file @
5144743a
...
...
@@ -14,30 +14,30 @@
/**
* Provide online user help.
*
* By implementing hook_help(), a module can make documentation
*
available to
the user for the module as a whole, or for specific paths.
*
Help for
developers should usually be provided via function
*
header comments in the
code, or in special API example files.
* By implementing hook_help(), a module can make documentation
available to
* the user for the module as a whole, or for specific paths.
Help for
* developers should usually be provided via function
header comments in the
* code, or in special API example files.
*
* For a detailed usage example, see page_example.module.
*
* @param $path
* The router menu path, as defined in hook_menu(), for the help that
*
is
being requested; e.g., 'admin/
nod
e' or 'user/
edit
'. If the router
path
* includes a
%
wildcard, then this will appear in $path
; for example,
*
node pages would have $path equal to 'node/%' or 'node/%/view'. Your hook
*
i
mple
mentation may also be called with special descriptors after a
*
"#" sign. Some examples:
*
- admin/help#modulename
*
The main module help text, displayed on the admin/help/modulename
*
page and linked to from the admin/help page.
*
- user
/help
#
modulename
*
The help for a distributed authorization module (if applicable)
.
* The router menu path, as defined in hook_menu(), for the help that
is
* being requested; e.g., 'admin/
peopl
e' or 'user/
register
'.
If the router
*
path
includes a wildcard, then this will appear in $path
as %, even if it
*
is a named %autoloader wildcard in the hook_menu() implementation; for
*
exa
mple
, node pages would have $path equal to 'node/%' or 'node/%/view'.
*
To provide a help page for a whole module with a listing on admin/help,
*
your hook implementation should match a path with a special descriptor
*
after a "#" sign:
*
'admin/help#modulename'
*
The main module help text, displayed on the admin
/help
/
modulename
*
page and linked to from the admin/help page
.
* @param $arg
* An array that corresponds to the return value of the arg() function, for
* modules that want to provide help that is specific to certain values
* of wildcards in $path. For example, you could provide help for the path
* 'user/1' by looking for the path 'user/%' and $arg[1] == '1'. This
* 'user/1' by looking for the path 'user/%' and $arg[1] == '1'. This
given
* array should always be used rather than directly invoking arg(), because
* your hook implementation may be called for other purposes besides building
* the current page's help. Note that depending on which module is invoking
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment