CoolCMS API

MessageListTrait uses trait:short

Conversation overview: "Received" / "Sent", with an option to keep only unread.

NOTE: "Sent" means I started the thread, not "I sent its last message". A conversation thus does not jump between mailboxes, but for that very reason even a sent thread can have an unread reply. The unread badge is therefore counted across both mailboxes, not only in received.

Table of Contents

Methods

actionList()  : void
handleHide()  : void
"Delete for me": the thread stays for the other party.
handleSwitchBox()  : void
Switches the mailbox without reloading the whole page.
paginationInit()  : Paginator|null
renderList()  : void
requirePagination()  : Paginator
Works like `paginationInit()`, but the paginator is required; a missing component is a wiring error.
loadMyParticipantsByThread()  : array<int, MessageParticipant>
Returns my participant rows by thread; they carry unread, role and archive.
preparePerPage()  : int

Methods

handleHide()

"Delete for me": the thread stays for the other party.

public handleHide(int $threadId) : void
Parameters
$threadId : int

handleSwitchBox()

Switches the mailbox without reloading the whole page.

public handleSwitchBox([string $box = '' ]) : void
Parameters
$box : string = ''

renderList()

public renderList([int $page = 1 ][, int $count = 20 ]) : void
Parameters
$page : int = 1
$count : int = 20

requirePagination()

Works like `paginationInit()`, but the paginator is required; a missing component is a wiring error.

public requirePagination(int $perPage) : Paginator
Parameters
$perPage : int
Return values
Paginator

loadMyParticipantsByThread()

Returns my participant rows by thread; they carry unread, role and archive.

private loadMyParticipantsByThread() : array<int, MessageParticipant>

It is :Api:Base:MessageParticipant:myList, the standard OwnedListTrait: the server sets the scope, the filter from here can only narrow it.

Return values
array<int, MessageParticipant>

preparePerPage()

private preparePerPage(int $count[, int $defaultCount = 20 ]) : int
Parameters
$count : int
$defaultCount : int = 20
Return values
int
On this page

Search results