Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
aa44116f
Commit
aa44116f
authored
Dec 19, 2011
by
Nathaniel Catchpole
Browse files
Issue
#1367014
by chris.leversuch: Clean up API docs for toolbar module.
parent
5fb188f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/toolbar/toolbar.module
View file @
aa44116f
...
...
@@ -65,7 +65,11 @@ function toolbar_menu() {
}
/**
* Menu callback; toggles the visibility of the toolbar drawer.
* Page callback: Toggles the visibility of the toolbar drawer.
*
* Path: toolbar/toggle
*
* @see toolbar_menu().
*/
function
toolbar_toggle_page
()
{
global
$base_path
;
...
...
@@ -82,6 +86,7 @@ function toolbar_toggle_page() {
* An associative array containing:
* - collapsed: A boolean value representing the toolbar drawer's visibility.
* - attributes: An associative array of HTML attributes.
*
* @return
* An HTML string representing the element for toggling.
*
...
...
@@ -124,10 +129,12 @@ function toolbar_page_build(&$page) {
}
/**
* Pr
e
render function for the toolbar.
* Pr
ovides pre_
render function for the toolbar.
*
* Since building the toolbar takes some time, it is done just prior to
* rendering to ensure that it is built only if it will be displayed.
*
* @see toolbar_page_build().
*/
function
toolbar_pre_render
(
$toolbar
)
{
$toolbar
=
array_merge
(
$toolbar
,
toolbar_view
());
...
...
@@ -175,7 +182,10 @@ function toolbar_system_info_alter(&$info, $file, $type) {
}
/**
* Build the admin menu as a structured array ready for drupal_render().
* Builds the admin menu as a structured array ready for drupal_render().
*
* @return
* Array of links and settings relating to the admin menu.
*/
function
toolbar_view
()
{
global
$user
;
...
...
@@ -273,7 +283,10 @@ function toolbar_view() {
}
/**
* Get only the top level items below the 'admin' path.
* Gets only the top level items below the 'admin' path.
*
* @return
* An array containing a menu tree of top level items below the 'admin' path.
*/
function
toolbar_get_menu_tree
()
{
$tree
=
array
();
...
...
@@ -290,10 +303,13 @@ function toolbar_get_menu_tree() {
}
/**
* Generate a links
array
from a menu tree array.
* Generate
s
a
n array of
links from a menu tree array.
*
* Based on menu_navigation_links(). Adds path based IDs and icon placeholders
* to the links.
*
* @return
* An array of links as defined above.
*/
function
toolbar_menu_navigation_links
(
$tree
)
{
$links
=
array
();
...
...
@@ -331,6 +347,9 @@ function toolbar_menu_navigation_links($tree) {
* Useful when using a menu generated by menu_tree_all_data() which does
* not set the 'in_active_trail' flag on items.
*
* @return
* TRUE when path is in the active trail, FALSE if not.
*
* @todo
* Look at migrating to a menu system level function.
*/
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment