UNB Components Code Reference

UnbSearch::GetMessageTree method

Gets all messages from a tree in their hierarchical order.

public static function UnbSearch::GetMessageTree ($messageId, $rootMessageId = null, $autoSelect = true, $maxLevel = null);

Parameters

messageId

(int) The message to select the tree path to

rootMessageId  –  optional, default: null

(int) The message to start reading the tree at

autoSelect  –  optional, default: true

(bool) Automatically select all messages from the root to the selected message and further every first reply

maxLevel  –  optional, default: null

(int) The maximum number of levels to dive in

Return value

(array) Array of message items, each item is an array with the indices:
* level: (int) Reply level, starting at 0
* msg: (UnbMessage) Message object
* rev: (UnbMessageRevision) Message revision object
* selected: (bool) This message was selected for displaying (it's along the selected path)
* morecount: (int) Number of reply messages at deeper levels

Member of class: UnbSearch

Implementation file: search.class.php, line 434

© 2011 Yves Goergen. UNB Components Homepage. Reference generated on 2011-02-22.