Bitrix API

Sender

Facade to send push-messages.

Table of Contents

Methods

send()  : Result
Sends $message to $userId through $channels.
sendContextMessage()  : Result
For sending different messages through different channels, for example, to send a message without a body through an internal channel to instantly intercept an event.
sendImmediate()  : Result
Sends $message to $userId through Application and Device channels.

Methods

send()

Sends $message to $userId through $channels.

public static send(int $userId, Message $message[, array<string|int, Channel>|null $channels = null ]) : Result

By default, uses ApplicationChannel only. It means that message will be delivered when user opens his mobile application.

Parameters
$userId : int
$message : Message
$channels : array<string|int, Channel>|null = null
Return values
Result

sendContextMessage()

For sending different messages through different channels, for example, to send a message without a body through an internal channel to instantly intercept an event.

public static sendContextMessage(int $userId, Message $applicationMessage, Message $deviceMessage) : Result
Parameters
$userId : int
$applicationMessage : Message
$deviceMessage : Message
Return values
Result

sendImmediate()

Sends $message to $userId through Application and Device channels.

public static sendImmediate(int $userId, Message $message) : Result

It means that message will be delivered as system push-notification, even mobile app is closed.

Parameters
$userId : int
$message : Message
Return values
Result

        
On this page

Search results