Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
269da037
Commit
269da037
authored
Apr 29, 2010
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#777080
by jhodgdon: Fixed hook_hook_info_alter() is not documented.
parent
41491108
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
modules/system/system.api.php
modules/system/system.api.php
+17
-0
No files found.
modules/system/system.api.php
View file @
269da037
...
...
@@ -32,6 +32,8 @@
* exists, and automatically load it when required.
*
* See system_hook_info() for all hook groups defined by Drupal core.
*
* @see hook_hook_info_alter().
*/
function
hook_hook_info
()
{
$hooks
[
'token_info'
]
=
array
(
...
...
@@ -43,6 +45,21 @@ function hook_hook_info() {
return
$hooks
;
}
/**
* Alter information from hook_hook_info().
*
* @param $hooks
* Information gathered by module_hook_info() from other modules'
* implementations of hook_hook_info(). Alter this array directly.
* See hook_hook_info() for information on what this may contain.
*/
function
hook_hook_info_alter
(
&
$hooks
)
{
// Our module wants to completely override the core tokens, so make
// sure the core token hooks are not found.
$hooks
[
'token_info'
][
'group'
]
=
'mytokens'
;
$hooks
[
'tokens'
][
'group'
]
=
'mytokens'
;
}
/**
* Inform the base system and the Field API about one or more entity types.
*
...
...
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