PHP Класс MessagesController, vanilla

Наследование: extends GardenController
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$ConversationModel ConversationModel
$Form Gdn_Form
$Offset The current offset of the paged data set. Defined and used by $this->Index and $this->All.
$RecipientData A dataset of users taking part in this discussion. Used by $this->Index.
$Uses Models to include.

Открытые методы

Метод Описание
add ( string $Recipient = '', string $Subject = '' ) Start a new conversation.
addMessage ( integer $ConversationID = '' ) Add a message to a conversation.
all ( string $Page = '' ) Show all conversations for the currently authenticated user.
bookmark ( integer $ConversationID = '', string $TransientKey = '' ) Allows users to bookmark conversations.
clear ( integer $ConversationID = false, string $TransientKey = '' ) Clear the message history for a specific conversation & user.
getNew ( $ConversationID, null $LastMessageID = null )
inbox ( string $Page = '' ) Show bookmarked conversations for the current user.
index ( integer $ConversationID = false, integer $Offset, integer $Limit = '' ) Shows all uncleared messages within a conversation for the viewing user
initialize ( ) Highlight route and include JS, CSS, and modules used by all methods.
leave ( integer $conversationID ) Leave a conversation that a user is participating in.
popin ( )

Описание методов

add() публичный Метод

Start a new conversation.
С версии: 2.0.0
public add ( string $Recipient = '', string $Subject = '' )
$Recipient string Username of the recipient.
$Subject string Subject of the message.

addMessage() публичный Метод

Add a message to a conversation.
С версии: 2.0.0
public addMessage ( integer $ConversationID = '' )
$ConversationID integer Unique ID of the conversation.

all() публичный Метод

Show all conversations for the currently authenticated user.
С версии: 2.0.0
public all ( string $Page = '' )
$Page string The page number argument.

bookmark() публичный Метод

Allows users to bookmark conversations.
public bookmark ( integer $ConversationID = '', string $TransientKey = '' )
$ConversationID integer Unique ID of conversation to view.
$TransientKey string Single-use hash to prove intent.

clear() публичный Метод

Clear the message history for a specific conversation & user.
public clear ( integer $ConversationID = false, string $TransientKey = '' )
$ConversationID integer Unique ID of conversation to clear.
$TransientKey string The CSRF token.

getNew() публичный Метод

public getNew ( $ConversationID, null $LastMessageID = null )
$ConversationID
$LastMessageID null

inbox() публичный Метод

Show bookmarked conversations for the current user.
public inbox ( string $Page = '' )
$Page string The page number string.

index() публичный Метод

Shows all uncleared messages within a conversation for the viewing user
С версии: 2.0.0
public index ( integer $ConversationID = false, integer $Offset, integer $Limit = '' )
$ConversationID integer Unique ID of conversation to view.
$Offset integer Number to skip.
$Limit integer Number to show.

initialize() публичный Метод

Always called by dispatcher before controller's requested method.
С версии: 2.0.0
public initialize ( )

leave() публичный Метод

Leave a conversation that a user is participating in.
public leave ( integer $conversationID )
$conversationID integer The ID of the conversation to leave.

popin() публичный Метод

public popin ( )

Описание свойств

$ConversationModel публичное свойство

public ConversationModel $ConversationModel
Результат ConversationModel

$Form публичное свойство

public Gdn_Form $Form
Результат Gdn_Form

$Offset публичное свойство

The current offset of the paged data set. Defined and used by $this->Index and $this->All.
public $Offset

$RecipientData публичное свойство

A dataset of users taking part in this discussion. Used by $this->Index.
public $RecipientData

$Uses публичное свойство

Models to include.
public $Uses