Bitrix API

ReactionItem implements RegistryEntry, ActiveRecord, RestConvertible, PopupDataAggregatable uses ContextCustomer, RegistryEntryImplementation, ActiveRecordImplementation

Table of Contents

Interfaces

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

Constants

ALLOWED_REACTION  = [self::LIKE, self::KISS, self::LAUGH, self::WONDER, self::CRY, self::ANGRY, self::FACEPALM]
ANGRY  = 'ANGRY'
CRY  = 'CRY'
FACEPALM  = 'FACEPALM'
KISS  = 'KISS'
LAUGH  = 'LAUGH'
LIKE  = 'LIKE'
WONDER  = 'WONDER'

Methods

__construct()  : mixed
beforeSaveReaction()  : Result
delete()  : Result
fill()  : static
Fills object's fields with provided values.
fillActual()  : self
getByMessage()  : self|null
getChatId()  : int
getContext()  : Context
Returns the local or global context for the action.
getDataClass()  : string
Returns ORM tablet class name.
getDataEntity()  : EntityObject
getDateCreate()  : DateTime
getDefaultDateCreate()  : DateTime
getDefaultReaction()  : string
getLocName()  : string|null
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.
getPrimaryId()  : int|null
getReaction()  : string
getRegistry()  : Registry|null
Return link of the object's registry.
getRestEntityName()  : string
Returns the name of the entity that will be used in the rest response
getUserId()  : int
isChanged()  : bool
Tells true if object has been changed.
isDeleted()  : bool
Tells true if object marked to drop.
load()  : Result
markChanged()  : static
Marks object changed.
markDrop()  : static
Marks object to drop on save.
onAfterOrmUpdate()  : self
prepareFields()  : Result
save()  : Result
setChatId()  : ReactionItem
setContext()  : self
Sets new context for operations.
setContextUser()  : self
setDateCreate()  : ReactionItem
setMessageId()  : ReactionItem
setPrimaryId()  : self
setReaction()  : ReactionItem
setRegistry()  : self
setUserId()  : ReactionItem
toArray()  : array<string|int, mixed>
Returns object state as array.
toRestFormat()  : array<string|int, mixed>|null
Returns an array in JSON like format to return the entity as a rest response.
validateReaction()  : Result
withContext()  : static
Provides local context for the action.
withContextUser()  : static
Provides local context for the action.

Constants

ALLOWED_REACTION

public mixed ALLOWED_REACTION = [self::LIKE, self::KISS, self::LAUGH, self::WONDER, self::CRY, self::ANGRY, self::FACEPALM]

Methods

__construct()

public __construct([mixed $source = null ]) : mixed
Parameters
$source : mixed = null

fill()

Fills object's fields with provided values.

public fill(array<string|int, mixed> $source) : static
Parameters
$source : array<string|int, mixed>
Return values
static

fillActual()

public fillActual(array<string|int, mixed> $fieldsToFill) : self
Parameters
$fieldsToFill : array<string|int, mixed>
Return values
self

getByMessage()

public static getByMessage(int $messageId, string $reaction, int $userId) : self|null
Parameters
$messageId : int
$reaction : string
$userId : int
Return values
self|null

getDataClass()

Returns ORM tablet class name.

public static getDataClass() : string
Return values
string

getDefaultReaction()

public getDefaultReaction() : string
Return values
string

getLocName()

public getLocName([string|null $languageId = null ]) : string|null
Parameters
$languageId : string|null = null
Return values
string|null

getMessageId()

public getMessageId() : int
Return values
int

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

getPrimaryId()

public getPrimaryId() : int|null
Return values
int|null

getReaction()

public getReaction() : string
Return values
string

getRestEntityName()

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

public static getRestEntityName() : string
Return values
string

markChanged()

Marks object changed.

public markChanged([bool|null $state = null ]) : static
Parameters
$state : bool|null = null
Return values
static

onAfterOrmUpdate()

public onAfterOrmUpdate(array<string|int, mixed> $fields) : self
Parameters
$fields : array<string|int, mixed>
Return values
self

setContext()

Sets new context for operations.

public setContext(Context|null $context) : self
Parameters
$context : Context|null
Return values
self

setContextUser()

public setContextUser(mixed $user) : self
Parameters
$user : mixed
Return values
self

setPrimaryId()

public setPrimaryId(int $primaryId) : self
Parameters
$primaryId : int
Return values
self

toArray()

Returns object state as array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

validateReaction()

public static validateReaction(string $reaction) : Result
Parameters
$reaction : string
Return values
Result

withContext()

Provides local context for the action.

public withContext(Context|null $context) : static
Parameters
$context : Context|null
Return values
static

withContextUser()

Provides local context for the action.

public withContextUser(int|User|User $user) : static
Parameters
$user : int|User|User
Return values
static

        
On this page

Search results