Bitrix24\Im\Notify::addSystem PHP Метод

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

public addSystem ( $userId, $message, string $tag = '', string $subTag = '', Attach $attachObject = null ) : array
$userId
$message
$tag string
$subTag string
$attachObject Bitrix24\Im\Attach\Attach
Результат array
    public function addSystem($userId, $message, $tag = '', $subTag = '', Attach $attachObject = null)
    {
        $arArgs = array('user_id' => (int) $userId, 'message' => (string) $message, 'tag' => (string) $tag, 'sub_tag' => (string) $subTag);
        if (null === $userId) {
            throw new Bitrix24Exception('user id is null');
        } elseif (null === $message) {
            throw new Bitrix24Exception('message is null');
        } elseif (null !== $attachObject) {
            $arArgs['attach'] = $attachObject->getData();
        }
        return $this->client->call('im.notify.system.add', $arArgs);
    }