Menu

Utility class working with menu select lists

abstract
since

1.5

package

Application

Methods

linkOptions

Build the multiple select list for Menu Links/Pages

linkOptions(bool all = false, bool unassigned = false, int clientId) : string
static
since

1.5

Arguments

all

boolTrue if all can be selected

unassigned

boolTrue if unassigned can be selected

clientId

intThe client id

Response

string

menuItemList

Displays an HTML select list of menu items.

menuItemList(string name, string selected = null, string attribs = null, array config = array()) : string
static
since

1.6

Arguments

name

stringThe name of the control.

selected

stringThe value of the selected option.

attribs

stringAttributes for the control.

config

arrayAn array of options for the control [id, published, checkacl, clientid].

Response

string

menuItems

Returns an array of menu items grouped by menu.

menuItems(array config = array()) : array
static
since

1.6

Arguments

config

arrayAn array of configuration options [published, checkacl, clientid].

Response

array

menus

Get a list of the available menus.

menus(int clientId) : array
static
since

1.6

Arguments

clientId

intThe client id

Response

array

ordering

Build the select list for Menu Ordering

ordering(object &row, int id) : string
static
since

1.5

Arguments

row

objectThe row object

id

intThe id for the row. Must exist to enable menu ordering

Response

string

treerecurse

Build the list representing the menu tree

treerecurse(int id, string indent, array list, array &children, int maxlevel = 9999, int level, int type = 1) : array
static
since

1.5

Arguments

id

intId of the menu item

indent

stringThe indentation string

list

arrayThe list to process

children

arrayThe children of the current item

maxlevel

intThe maximum number of levels in the tree

level

intThe starting level

type

intSet the type of spacer to use. Use 1 for |_ or 0 for -

Response

array

Properties

menus

Cached array of the menus.

static
since

1.6

Type(s)

array

items

Cached array of the menus items.

static
since

1.6

Type(s)

array