UNB Components Code Reference

UnbMessageRevision::FindByRevisionId method

Finds a message revision instance by its message revision ID.

public static function UnbMessageRevision::FindByRevisionId ($messageRevisionId, $contentLevel = null, $allowFallback = false);

Parameters

messageRevisionId

(int) Message revision ID

contentLevel  –  optional, default: null

(int) Specifies whether the content should be retrieved from the database, too. This can be one of the following values:
* UnbMessageRevisionContentLevel::NoContent - Don't retrieve any content
* UnbMessageRevisionContentLevel::Subject - Retrieve the subject and summary only
* UnbMessageRevisionContentLevel::Content - Also retrieve the normal content field (default if unset)
* UnbMessageRevisionContentLevel::HtmlContent - Retrieve the normal content field and its cached HTML version.

allowFallback  –  optional, default: false

(bool) Allow falling back to a lower content level if moderation restrictions require it

Return value

A UnbMessageRevision object, if successful, null otherwise.

Exceptions thrown

InvalidArgumentException 

On invalid argument type or value.

UnbDatabaseException No description available.

Privileges required

Need read access on the message. Additionally, message and message revision must not have a moderation lock of any kind. Exceptions are documented separately.

Member of class: UnbMessageRevision

Implementation file: messagerevision.class.php, line 832

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