phpDocumentor pond
[ class tree: pond ] [ index: pond ] [ all elements ]

Class: Menu

Source Location: /qp_inc/_core/ui/_menu.class.php

Class Menu

Descendants
Child Class Description
AdminUI_general The general Admin UI class. It provides functions to handle the UI part of the Backoffice.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Widget

Widget::$global_icons
Widget::$params
Widget::$title

Inherited From Widget

Widget::Widget()
Constructor
Widget::disp_template_raw()
Display a template param without replacing variables
Widget::disp_template_replaced()
Display a template param with its variables replaced
Widget::gen_global_icons()
Generate img tags for registered icons, through global_icon().
Widget::global_icon()
Registers a global action icon
Widget::replace_callback()
Callback function used to replace only necessary values in template.
Widget::replace_callback_wrapper()
This is an additional wrapper to replace_vars() that allows to react on the return value of it.
Widget::replace_vars()
Replaces $vars$ with appropriate values.

[ Top ]
Property Summary
array   $_menus   The menu structure (array of arrays)

[ Top ]
Method Summary
void   add_menu_entries()   Add menu entries to the list of entries for a given path.
string   get_html_menu()   Get the HTML for the menu entries of a specific path.
array   get_menu_entries()   Get menu entries for a given path.
array|false   &get_node_by_path()   Get the reference of a node from the menu entries using a path.
string|false   get_selected()   Get the key of a selected entry for a path.
array   get_template()   Get a template by name.

[ Top ]
Properties
array   $_menus = array() [line 48]

The menu structure (array of arrays)

Use add_menu_entries() to add them here.

API Tags:
Access:  protected


[ Top ]
Methods
add_menu_entries  [line 64]

  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:
Usedby:  AdminUI_general::unshift_menu_entries()


[ Top ]
get_html_menu  [line 164]

  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:
NULL|string|array   $path:  The path. See get_node_by_path().
string   $template:  Template name, see get_template().
   $level: 

API Tags:
Return:  The HTML for the menu.


[ Top ]
get_menu_entries  [line 130]

  array get_menu_entries( NULL|string|array $path  )

Get menu entries for a given path.

Parameters:
NULL|string|array   $path:  The path. See get_node_by_path().

API Tags:
Return:  The menu entries (may be empty).


[ Top ]
get_node_by_path  [line 91]

  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
  1. 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).


[ Top ]
get_selected  [line 144]

  string|false get_selected( NULL|string|array $path  )

Get the key of a selected entry for a path.

Parameters:
NULL|string|array   $path:  The path. See get_node_by_path().


[ Top ]
get_template  [line 323]

  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:

[ Top ]