model/modx/modmenu.class.php

Classes 
package
modx
Classes
modMenu

Description

Represents a menu item at the top of the MODX manager.

\modMenu

Extends from
\modAccessibleObject
package
modx
Methods
getSubMenus
rebuildCache
remove
save

Description

Represents a menu item at the top of the MODX manager.

This is the basis for the entire xPDO object model, and can also be used by a class generator {@link xPDOGenerator}, ultimately allowing custom classes to be user-defined in a web interface and framework-generated at runtime.

Methods

getSubMenus

getSubMenus( integer $start ) : array

Gets all submenus from a start menu.

Arguments
$start
integer
The top menu to load from.
Output
array
An array of modMenu objects, in tree form.
Details
visibility
public
final
false
static
false
access
public

rebuildCache

rebuildCache( integer $start ) : array

Rebuilds the menu map cache.

Arguments
$start
integer
The start menu to build from recursively.
Output
array
An array of modMenu objects, in tree form.
Details
visibility
public
final
false
static
false
access
public

remove

remove( array $ancestors = array ) : boolean

Overrides xPDOObject::remove to cache the menus.

{@inheritdoc}

Arguments
$ancestors
array
Keeps track of classes which have already been removed to prevent loop with circular references.
Output
boolean
Returns true on success, false on failure.
Details
visibility
public
final
false
static
false

save

save( boolean|integer $cacheFlag = null ) : boolean

Overrides xPDOObject::save to cache the menus.

{@inheritdoc}

Arguments
$cacheFlag
booleaninteger
Indicates if the saved object(s) should be cached and optionally, by specifying an integer value, for how many seconds before expiring. Overrides the cacheFlag for the object(s).
Output
boolean
Returns true on success, false on failure.
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox 0.11.2.