mgd_walk_event_tree

(Midgard 1.4.2 'Bifrost')

mgd_walk_event_tree -- walk an event tree

Description

bool mgd_walk_event_tree (string func, int root, int maxlevel, mixed &xparam, bool [order])

Walks the event tree beginning at the event with id root to a level of maxlevel deep. For each event the user defined function func is called. Parameters passed to this function will be: id, the id of the event currently being walked, level , the level of descendance from the root level and &xparam, a variable passed through by the user. If order is FALSE, each event will be processed after all its children. If set to TRUE each event will be processed before its children.

Returns TRUE on success, FALSE on failure.