UNB Components Code Reference

UnbMessageRevision class

The message revision class represents a single message revision in the UNB system and provides methods to find and manipulate message revision instances.

It depends on the UnbDatabase class for a database connection. It also uses the class UnbTag to manage message revision tags.

Extends class

UnbEntity

Public methods

   AddFile

Assigns a file message to this message revision.

   AddTag

Assigns a tag to this message revision.

S CountByMessageId

Gets the number of revisions of a message.

S Create

Creates a new message revision instance for a message.

   CreateCopy

Creates a new message revision instance for a message, based on this revision.

   Delete

Deletes this instance of the message revision with all its references.

S FindAllByMessageId

Finds all message revisions by their message ID.

S FindAllDrafts

Finds all draft message revisions from the logged in user.

S FindByRevisionId

Finds a message revision instance by its message revision ID.

S FindLatestByMessageId

Finds the latest accessible message revision instance by its message ID and moderation state.

   GetAuthorUser

Gets the UnbUser object of the message revision's author.

   GetAuthorUserId

Gets the user ID of the author who created this revision.

   GetContent

Gets the message revision's full content (if retrieved).

   GetContentLevel

Gets the revision's content level.

   GetContentType

Gets this revision's attachment data MIME content type.

   GetCreatedTime

Gets the time when the revision was created.

   GetFileData

Gets the contents of an attachment file.

   GetFileDataLength

Gets the length of an attachment file in bytes.

   GetFileDataPath

Gets the name of the attachment file on disk.

   GetFileIds

Gets (unsorted) message IDs of all file messages assigned to this message revision.

   GetFileRelations

Gets (unsorted) message IDs mapped to relation types for all file messages assigned to this message revision.

   GetHtmlContent

Gets the message revision's cached HTML version of the content (if available and retrieved).

   GetMessageId

Gets the revision's message ID.

   GetMessageRevisionId

Gets the revision's message revision ID.

   GetModerationState

Gets this revision's moderation state.

   GetRevisionNumber

Gets the counting number of this revision.

   GetSubject

Gets the message revision's subject.

   GetSummary

Gets this revision's summary of changes to the previous one.

   GetTagIds

Gets (unsorted) tag IDs of all tags assigned to this message revision.

   GetTags

Gets UnbTag objects of all tags assigned to this message revision.

S GetUploadPath

Gets the base upload path. For internal use.

   IsDraft

Gets a value indicating whether this message revision is a draft.

   IsFileDataAvailable

Determines whether attachment file data is available.

   RemoveTag

Removes a tag from this message revision.

   SetHtmlContent

Sets the message revision's cached HTML version of the content.

   SetModerationState

Sets this revision's moderation state.

Protected methods

S FromRecord

Creates a UnbMessageRevision object from a database record array.

Private methods

   Class constructor No description available.
S ReadInternal

Reads a message revision from the database.

Private fields

author  –  default: 0

User who created this revision

authorUser  –  default: null

Cached author UnbUser object

content  –  default: ''
contentLevel  –  default: 0

Remembers which level of content was requested for this revision

contentType  –  default: ''

Attachment data MIME content type

createdTime  –  default: 0

Time when this revision was created

db

Cached UnbDatabase instance

draft  –  default: false

Is this message revision a draft?

files  –  default: null

Cached file attachments list

htmlContent  –  default: ''

Cached HTML output of the parsed content, used to accelerate displaying of the message (revision)

messageId  –  default: 0

ID of the message that this revision belongs to

messageRevisionId  –  default: 0

Message revision ID

moderationState  –  default: 0

Moderation state of this single revision (see UnbMessageRevision::MS_* constants)

revisionNumber  –  default: 0

Cached revision number

subject  –  default: ''

Subject of the message (revision)

summary  –  default: ''

Summary of the changes in this revivion to the previous one

Implementation file: messagerevision.class.php, line 47

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