Bitrix API

Chat extends Chat

Table of Contents

Constants

ERROR_REQUIRED_PARAMETER  = 'MAIN_CONTROLLER_22001'
ERROR_UNKNOWN_ACTION  = 'MAIN_CONTROLLER_22002'
EVENT_ON_AFTER_ACTION  = 'onAfterAction'
EVENT_ON_BEFORE_ACTION  = 'onBeforeAction'
EXCEPTION_UNKNOWN_ACTION  = 22002
SCOPE_AJAX  = 'ajax'
SCOPE_CLI  = 'cli'
SCOPE_REST  = 'rest'

Methods

__construct()  : mixed
Constructor Controller.
addAction()  : array<string|int, mixed>|null
addManagersAction()  : array<string|int, mixed>|null
addUsersAction()  : array<string|int, mixed>|null
className()  : string
Returns the fully qualified name of this class.
configureActions()  : array<string|int, mixed>
convertKeysToCamelCase()  : array<string|int, mixed>|mixed|string
Converts keys of array to camel case notation.
deleteAction()  : mixed
deleteManagersAction()  : array<string|int, mixed>|null
deleteUserAction()  : array<string|int, mixed>|null
extendPullWatchAction()  : array<string|int, mixed>|null
finalizeResponse()  : void
Finalizes response.
forward()  : HttpResponse|mixed
generateActionMethodName()  : string
getAction()  : array<string|int, mixed>|null
getActionUri()  : Uri
Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.
getAutoWiredParameters()  : array<string|int, Parameter>
getConfigurationOfActions()  : array<string|int, mixed>|null
getCurrentUser()  : CurrentUser
getDefaultAutoWiredParameters()  : array<string|int, Parameter>
getErrorByCode()  : Error
Getting once error with the necessary code.
getErrors()  : array<string|int, Error>
Getting array of errors.
getFullEventName()  : string
getModuleId()  : string
Returns module id.
getPrimaryAutoWiredParameter()  : Parameter|null
getRequest()  : HttpRequest
getScope()  : string
getSourceParametersList()  : array<string|int, mixed>
getUnsignedParameters()  : mixed
isLocatedUnderPsr4()  : bool
joinAction()  : array<string|int, mixed>|null
listNameActions()  : array<string|int, mixed>
Returns list of all
listSharedAction()  : array<string|int, mixed>|null
loadAction()  : array<string|int, mixed>|null
loadInContextAction()  : array<string|int, mixed>|null
pinAction()  : array<string|int, mixed>|null
readAction()  : array<string|int, mixed>|null
readAllAction()  : array<string|int, mixed>|null
recursiveWhiteList()  : mixed
redirectTo()  : Redirect
Redirect to URL.
run()  : HttpResponse|mixed
setAvatarAction()  : mixed
setAvatarIdAction()  : mixed
setColorAction()  : mixed
setCurrentUser()  : void
setDescriptionAction()  : mixed
setDisappearingDurationAction()  : mixed
setManageMessagesAction()  : mixed
setManagersAction()  : mixed
setManageSettingsAction()  : mixed
setManageUIAction()  : mixed
setManageUsersAddAction()  : mixed
setManageUsersDeleteAction()  : mixed
setOwnerAction()  : mixed
setScope()  : Controller
setSourceParametersList()  : Controller
setTitleAction()  : mixed
shallowLoadAction()  : array<string|int, mixed>|null
sortPinAction()  : array<string|int, mixed>|null
startRecordVoiceAction()  : array<string|int, mixed>|null
unpinAction()  : array<string|int, mixed>|null
unreadAction()  : array<string|int, mixed>|null
updateAction()  : mixed
updateAvatarAction()  : mixed

Constants

ERROR_REQUIRED_PARAMETER

public mixed ERROR_REQUIRED_PARAMETER = 'MAIN_CONTROLLER_22001'

ERROR_UNKNOWN_ACTION

public mixed ERROR_UNKNOWN_ACTION = 'MAIN_CONTROLLER_22002'

EVENT_ON_AFTER_ACTION

public mixed EVENT_ON_AFTER_ACTION = 'onAfterAction'

EVENT_ON_BEFORE_ACTION

public mixed EVENT_ON_BEFORE_ACTION = 'onBeforeAction'

EXCEPTION_UNKNOWN_ACTION

public mixed EXCEPTION_UNKNOWN_ACTION = 22002

Methods

__construct()

Constructor Controller.

public __construct([Request|null $request = null ]) : mixed
Parameters
$request : Request|null = null

addAction()

public addAction(array<string|int, mixed> $fields) : array<string|int, mixed>|null
Parameters
$fields : array<string|int, mixed>
Tags
restMethod

im.v2.Chat.add

Return values
array<string|int, mixed>|null

addManagersAction()

public addManagersAction(GroupChat $chat, array<string|int, mixed> $userIds) : array<string|int, mixed>|null
Parameters
$chat : GroupChat
$userIds : array<string|int, mixed>
Tags
restMethod

im.v2.Chat.addManagers

Return values
array<string|int, mixed>|null

addUsersAction()

public addUsersAction(Chat $chat, array<string|int, mixed> $userIds[, string|null $hideHistory = null ]) : array<string|int, mixed>|null
Parameters
$chat : Chat
$userIds : array<string|int, mixed>
$hideHistory : string|null = null
Tags
restMethod

im.v2.Chat.addUsers

Return values
array<string|int, mixed>|null

className()

Returns the fully qualified name of this class.

public final static className() : string
Return values
string

configureActions()

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

convertKeysToCamelCase()

Converts keys of array to camel case notation.

public convertKeysToCamelCase(mixed $data) : array<string|int, mixed>|mixed|string
Parameters
$data : mixed

Data.

Tags
see
Converter::OUTPUT_JSON_FORMAT
Return values
array<string|int, mixed>|mixed|string

deleteAction()

public deleteAction(Chat $chat) : mixed
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.delete

throws
Exception

deleteManagersAction()

public deleteManagersAction(GroupChat $chat, array<string|int, mixed> $userIds) : array<string|int, mixed>|null
Parameters
$chat : GroupChat
$userIds : array<string|int, mixed>
Tags
restMethod

im.v2.Chat.deleteManagers

Return values
array<string|int, mixed>|null

deleteUserAction()

public deleteUserAction(Chat $chat, int $userId) : array<string|int, mixed>|null
Parameters
$chat : Chat
$userId : int
Tags
restMethod

im.v2.Chat.deleteUser

Return values
array<string|int, mixed>|null

extendPullWatchAction()

public extendPullWatchAction(Chat $chat) : array<string|int, mixed>|null
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.extendPullWatch

Return values
array<string|int, mixed>|null

finalizeResponse()

Finalizes response.

public finalizeResponse(Response $response) : void

The method will be invoked when HttpApplication will be ready to send response to client. It's a final place where Controller can interact with response.

Parameters
$response : Response

forward()

public forward(Controller|string $controller, string $actionName[, array<string|int, mixed>|null $parameters = null ]) : HttpResponse|mixed
Parameters
$controller : Controller|string
$actionName : string
$parameters : array<string|int, mixed>|null = null
Tags
throws
SystemException
Return values
HttpResponse|mixed

generateActionMethodName()

public final generateActionMethodName(mixed $action) : string
Parameters
$action : mixed
Return values
string

getAction()

public getAction(Chat $chat) : array<string|int, mixed>|null
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.get

Return values
array<string|int, mixed>|null

getActionUri()

Returns uri for ajax end point for the action name. It's a helper, which uses relative action name without controller name.

public final getActionUri(string $actionName[, array<string|int, mixed> $params = [] ][, bool $absolute = false ]) : Uri
Parameters
$actionName : string

Action name. It's a relative action name without controller name.

$params : array<string|int, mixed> = []

Parameters for creating uri.

$absolute : bool = false
Return values
Uri

getConfigurationOfActions()

public final getConfigurationOfActions() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getDefaultAutoWiredParameters()

public final getDefaultAutoWiredParameters() : array<string|int, Parameter>
Return values
array<string|int, Parameter>

getErrorByCode()

Getting once error with the necessary code.

public final getErrorByCode(string $code) : Error
Parameters
$code : string

Code of error.

Return values
Error

getErrors()

Getting array of errors.

public final getErrors() : array<string|int, Error>
Return values
array<string|int, Error>

getFullEventName()

public final static getFullEventName(mixed $eventName) : string
Parameters
$eventName : mixed
Return values
string

getModuleId()

Returns module id.

public final getModuleId() : string

Tries to guess module id by file path and function @see getModuleId().

Return values
string

getPrimaryAutoWiredParameter()

public getPrimaryAutoWiredParameter() : Parameter|null
Return values
Parameter|null

getRequest()

public final getRequest() : HttpRequest
Return values
HttpRequest

getScope()

public final getScope() : string
Return values
string

getSourceParametersList()

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

getUnsignedParameters()

public final getUnsignedParameters() : mixed

isLocatedUnderPsr4()

public final isLocatedUnderPsr4() : bool
Return values
bool

joinAction()

public joinAction(Chat $chat) : array<string|int, mixed>|null
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.join

Return values
array<string|int, mixed>|null

listNameActions()

Returns list of all

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

listSharedAction()

public listSharedAction(array<string|int, mixed> $filter[, int $limit = self::DEFAULT_LIMIT ][, int $offset = 0 ]) : array<string|int, mixed>|null
Parameters
$filter : array<string|int, mixed>
$limit : int = self::DEFAULT_LIMIT
$offset : int = 0
Tags
restMethod

im.v2.Chat.listShared

Return values
array<string|int, mixed>|null

loadAction()

public loadAction(Chat $chat[, int $messageLimit = ChatMessage::DEFAULT_LIMIT ][, int $pinLimit = Pin::DEFAULT_LIMIT ][, string $ignoreMark = 'N' ]) : array<string|int, mixed>|null
Parameters
$chat : Chat
$messageLimit : int = ChatMessage::DEFAULT_LIMIT
$pinLimit : int = Pin::DEFAULT_LIMIT
$ignoreMark : string = 'N'
Tags
restMethod

im.v2.Chat.load

Return values
array<string|int, mixed>|null

loadInContextAction()

public loadInContextAction(Message $message[, int $messageLimit = ChatMessage::DEFAULT_LIMIT ][, int $pinLimit = Pin::DEFAULT_LIMIT ]) : array<string|int, mixed>|null
Parameters
$message : Message
$messageLimit : int = ChatMessage::DEFAULT_LIMIT
$pinLimit : int = Pin::DEFAULT_LIMIT
Tags
restMethod

im.v2.Chat.loadInContext

Return values
array<string|int, mixed>|null

pinAction()

public pinAction(Chat $chat, CurrentUser $user) : array<string|int, mixed>|null
Parameters
$chat : Chat
$user : CurrentUser
Tags
restMethod

im.v2.Chat.pin

Return values
array<string|int, mixed>|null

readAction()

public readAction(Chat $chat[, string $onlyRecent = 'N' ]) : array<string|int, mixed>|null
Parameters
$chat : Chat
$onlyRecent : string = 'N'
Tags
restMethod

im.v2.Chat.read

Return values
array<string|int, mixed>|null

readAllAction()

public readAllAction(CurrentUser $user) : array<string|int, mixed>|null
Parameters
$user : CurrentUser
Tags
restMethod

im.v2.Chat.readAll

Return values
array<string|int, mixed>|null

recursiveWhiteList()

public static recursiveWhiteList(mixed $fields, mixed $whiteList[, bool $sanitizeOnly = false ]) : mixed
Parameters
$fields : mixed
$whiteList : mixed
$sanitizeOnly : bool = false

run()

public final run(mixed $actionName, array<string|int, mixed> $sourceParametersList) : HttpResponse|mixed
Parameters
$actionName : mixed
$sourceParametersList : array<string|int, mixed>
Tags
throws
SystemException
Return values
HttpResponse|mixed

setAvatarAction()

public setAvatarAction(Chat $chat, string $avatarBase64) : mixed
Parameters
$chat : Chat
$avatarBase64 : string
Tags
restMethod

im.v2.Chat.setAvatar

setAvatarIdAction()

public setAvatarIdAction(Chat $chat, int $avatarId) : mixed
Parameters
$chat : Chat
$avatarId : int
Tags
restMethod

im.v2.Chat.setAvatarId

setColorAction()

public setColorAction(Chat $chat, string $color) : mixed
Parameters
$chat : Chat
$color : string
Tags
restMethod

im.v2.Chat.setColor

setDescriptionAction()

public setDescriptionAction(Chat $chat, string $description) : mixed
Parameters
$chat : Chat
$description : string
Tags
restMethod

im.v2.Chat.setDescription

setDisappearingDurationAction()

public setDisappearingDurationAction(Chat $chat, int $hours) : mixed
Parameters
$chat : Chat
$hours : int
Tags
restMethod

im.v2.Chat.setDisappearingDuration

setManageMessagesAction()

public setManageMessagesAction(Chat $chat, string $rightsLevel) : mixed
Parameters
$chat : Chat
$rightsLevel : string
Tags
restMethod

im.v2.Chat.setManageMessages

setManagersAction()

public setManagersAction(Chat $chat, array<string|int, mixed> $userIds) : mixed
Parameters
$chat : Chat
$userIds : array<string|int, mixed>
Tags
restMethod

im.v2.Chat.setManagers

setManageSettingsAction()

public setManageSettingsAction(Chat $chat, string $rightsLevel) : mixed
Parameters
$chat : Chat
$rightsLevel : string
Tags
restMethod

im.v2.Chat.setManageSettings

setManageUIAction()

public setManageUIAction(Chat $chat, string $rightsLevel) : mixed
Parameters
$chat : Chat
$rightsLevel : string
Tags
restMethod

im.v2.Chat.setManageUI

setManageUsersAddAction()

public setManageUsersAddAction(Chat $chat, string $rightsLevel) : mixed
Parameters
$chat : Chat
$rightsLevel : string
Tags
restMethod

im.v2.Chat.setManageUsersAdd

setManageUsersDeleteAction()

public setManageUsersDeleteAction(Chat $chat, string $rightsLevel) : mixed
Parameters
$chat : Chat
$rightsLevel : string
Tags
restMethod

im.v2.Chat.setManageUsersDelete

setOwnerAction()

public setOwnerAction(Chat $chat, int $ownerId) : mixed
Parameters
$chat : Chat
$ownerId : int
Tags
restMethod

im.v2.Chat.setOwner

setSourceParametersList()

public final setSourceParametersList(array<string|int, mixed> $sourceParametersList) : Controller
Parameters
$sourceParametersList : array<string|int, mixed>
Return values
Controller

setTitleAction()

public setTitleAction(Chat $chat, string $title) : mixed
Parameters
$chat : Chat
$title : string
Tags
restMethod

im.v2.Chat.setTitle

shallowLoadAction()

public shallowLoadAction(Chat $chat) : array<string|int, mixed>|null
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.shallowLoad

Return values
array<string|int, mixed>|null

sortPinAction()

public sortPinAction(Chat $chat, int $newPosition, CurrentUser $user) : array<string|int, mixed>|null
Parameters
$chat : Chat
$newPosition : int
$user : CurrentUser
Tags
restMethod

im.v2.Chat.sortPin

Return values
array<string|int, mixed>|null

startRecordVoiceAction()

public startRecordVoiceAction(Chat $chat) : array<string|int, mixed>|null
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.startRecordVoice

Return values
array<string|int, mixed>|null

unpinAction()

public unpinAction(Chat $chat, CurrentUser $user) : array<string|int, mixed>|null
Parameters
$chat : Chat
$user : CurrentUser
Tags
restMethod

im.v2.Chat.unpin

Return values
array<string|int, mixed>|null

unreadAction()

public unreadAction(Chat $chat) : array<string|int, mixed>|null
Parameters
$chat : Chat
Tags
restMethod

im.v2.Chat.unread

Return values
array<string|int, mixed>|null

updateAction()

public updateAction(GroupChat $chat, array<string|int, mixed> $fields) : mixed
Parameters
$chat : GroupChat
$fields : array<string|int, mixed>
Tags
restMethod

im.v2.Chat.update

updateAvatarAction()

public updateAvatarAction(Chat $chat, string $avatar) : mixed
Parameters
$chat : Chat
$avatar : string
Tags
restMethod

im.v2.Chat.updateAvatar


        
On this page

Search results