Mostly Harmless

UE3:WebAdminMenu (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 10:11, 17 May 2008 by Wormbo (Talk | contribs) (Auto-generated page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT3 Object >> WebAdminMenu
Package: 
WebAdmin

Menu manager for the webadmin

Copyright 2008 Epic Games, Inc. All Rights Reserved

Author: Michiel 'elmuerte' Hendriks

Properties[edit]

menu[edit]

Type: array<MenuItem>


tree[edit]

Type: array<TreeItem>


webadmin[edit]

Type: WebAdmin


Structs[edit]

MenuItem[edit]

string path 
The absolute path (from the webapp path). Examples:

foo foo/bar/quux bar bar/quux bar/quux2

string title 
Title of the menu item
string description 
A short description
int weight 
The weight of this item. A low number means it will be higher in the list.
IQueryHandler handler 
The handler responsible for handling this menu item.

TreeItem[edit]

int cur 
Index to the item in the menu list;
string elm 
Path element
array<int> children 

Instance functions[edit]

addMenu[edit]

function addMenu (string path, string title, IQueryHandler handler, optional string description, optional int weight)

Add a new menu item (or overwrite the previous for the given path).

addMenuItem[edit]

function addMenuItem (MenuItem item)

Add an item to the menu, or if the path already exist, update an existing item. To create a hidden item simply leave out the title.

addSortedItem[edit]

protected function addSortedItem (MenuItem item)

Add a menu item to the list sorting on the full path.

createTree[edit]

protected function createTree ()

Parses the sorted list of menu items and creates the tree.

getHandlerFor[edit]

function IQueryHandler getHandlerFor (string path, out string title, out string desc)

Get the menu handler for a given path

getUserMenu[edit]

function WebAdminMenu getUserMenu (IWebAdminUser forUser)

return the menu instance of the given user. All paths to which the user has no access will be filtered from the list.

Returns:

none when the user has absolutely no access, otherwise an instance is returned that only contains the paths the user has access to.

render[edit]

function string render ()

Render the current menu tree to a navigation menu

renderChilds[edit]

protected function string renderChilds (array<intchilds, WebResponse wr)