void add_menu_entries(
NULL|string|array
$path, array
$new_entries
)
|
|
Add menu entries to the list of entries for a given path.
Parameters:
|
NULL|string|array |
$path: |
The path to add the entries to. See get_node_by_path(). |
|
array |
$new_entries: |
Menu entries to add (key (string) => entry (array)). An entry can have the following keys: 'text': Text/Caption for this entry. 'href': The link for this entry. 'entries': array of sub-entries DEPRECATED 'style': CSS style for this entry. DEPRECATED 'onclick': onclick property for this entry. DEPRECATED 'name': name attribute of the link/entry. |
API Tags:
string get_html_menu(
[NULL|string|array
$path = NULL], [string
$template = 'main'], [
$level = 0]
)
|
|
Get the HTML for the menu entries of a specific path.
Parameters:
API Tags:
| Return: | The HTML for the menu. |
array get_menu_entries(
NULL|string|array
$path
)
|
|
Get menu entries for a given path.
Parameters:
API Tags:
| Return: | The menu entries (may be empty). |
array|false &get_node_by_path(
array|string|NULL
$path, [boolean
$createIfNotExisting = false]
)
|
|
Get the reference of a node from the menu entries using a path.
Parameters:
|
array|string|NULL |
$path: |
The path. NULL means root, string means child of root, array means path below root. (eg array('options', 'general')
). |
|
boolean |
$createIfNotExisting: |
Should the node be created if it does not exist already? |
API Tags:
| Return: | The node as array or false, if the path does not exist (and we do not $createIfNotExisting). |
string|false get_selected(
NULL|string|array
$path
)
|
|
Get the key of a selected entry for a path.
Parameters:
array get_template(
string
$name, [
$level = 0]
)
|
|
Get a template by name.
This is a method (and not a member array) to allow dynamic generation and T_()
Parameters:
|
string |
$name: |
Name of the template ('main', 'sub') |
|
|
$level: |
|
API Tags:
| Return: | Associative array which defines layout and optionally properties. |
Redefined in descendants as: