Bitrix API

ReactionMessage implements RestConvertible, PopupDataAggregatable

Table of Contents

Interfaces

RestConvertible
PopupDataAggregatable
An interface for classes that have entities within them that should be taken to the top level of a REST response.

Constants

COUNT_DISPLAYED_USERS  = 5

Methods

__construct()  : mixed
addCounter()  : self
addOwnReaction()  : self
addUsers()  : self
getByMessageId()  : self
getMessageId()  : int
getPopupData()  : PopupData
Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.
getRestEntityName()  : string
Returns the name of the entity that will be used in the rest response
getUserIds()  : array<int, int>
haveDisplayedUsers()  : bool
haveReactions()  : bool
needToFillOwnReactions()  : bool
toRestFormat()  : array<string|int, mixed>|null
Returns an array in JSON like format to return the entity as a rest response.

Constants

Methods

__construct()

public __construct(int $messageId) : mixed
Parameters
$messageId : int

addCounter()

public addCounter(string $reaction, int $counter) : self
Parameters
$reaction : string
$counter : int
Return values
self

addOwnReaction()

public addOwnReaction(string $reaction) : self
Parameters
$reaction : string
Return values
self

addUsers()

public addUsers(string $reaction, array<string|int, mixed> $users) : self
Parameters
$reaction : string
$users : array<string|int, mixed>
Return values
self

getByMessageId()

public static getByMessageId(int $messageId) : self
Parameters
$messageId : int
Return values
self

getPopupData()

Returns the data to be raised to the top of the REST response. Works on the principle of the composite pattern.

public getPopupData([array<string|int, mixed> $excludedList = [] ]) : PopupData
Parameters
$excludedList : array<string|int, mixed> = []
Return values
PopupData

getRestEntityName()

Returns the name of the entity that will be used in the rest response

public static getRestEntityName() : string
Return values
string

getUserIds()

public getUserIds() : array<int, int>
Return values
array<int, int>

haveDisplayedUsers()

public haveDisplayedUsers() : bool
Return values
bool

needToFillOwnReactions()

public needToFillOwnReactions() : bool
Return values
bool

toRestFormat()

Returns an array in JSON like format to return the entity as a rest response.

public toRestFormat([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>|null
Parameters
$option : array<string|int, mixed> = []
Return values
array<string|int, mixed>|null

        
On this page

Search results