Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
actionsms.php
1
<?php
9
namespace
Bitrix\Main\EventLog
;
10
11
class
ActionSms
extends
Action
12
{
13
const
EVENT_TYPE
=
'SMS_EVENT_LOG_NOTIFICATION'
;
14
15
public
function
__construct
(
$recipient
,
$text
)
16
{
17
parent::__construct(
Action::TYPE_SMS
,
$recipient
,
$text
);
18
}
19
23
public
function
send
(
Notification
$notification)
24
{
25
$site = \CSite::GetDefSite();
26
27
$fields = static::getNotificationFields($notification);
28
$fields[
"PHONE_NUMBER"
] = $this->
getRecipient
();
29
$fields[
"ADDITIONAL_TEXT"
] = $this->
getText
();
30
31
$sms = new \Bitrix\Main\Sms\Event(self::EVENT_TYPE, $fields);
32
$sms->setSite($site);
33
$sms->send();
34
}
35
}
Bitrix\Main\EventLog\Action
Definition
action.php:12
Bitrix\Main\EventLog\Action\getRecipient
getRecipient()
Definition
action.php:67
Bitrix\Main\EventLog\Action\TYPE_SMS
const TYPE_SMS
Definition
action.php:14
Bitrix\Main\EventLog\Action\getText
getText()
Definition
action.php:76
Bitrix\Main\EventLog\Action\$recipient
$recipient
Definition
action.php:17
Bitrix\Main\EventLog\Action\$text
$text
Definition
action.php:18
Bitrix\Main\EventLog\ActionSms
Definition
actionsms.php:12
Bitrix\Main\EventLog\ActionSms\EVENT_TYPE
const EVENT_TYPE
Definition
actionsms.php:13
Bitrix\Main\EventLog\ActionSms\send
send(Notification $notification)
Definition
actionsms.php:23
Bitrix\Main\EventLog\ActionSms\__construct
__construct($recipient, $text)
Definition
actionsms.php:15
Bitrix\Main\EventLog\Notification
Definition
notification.php:43
Bitrix\Main\EventLog
Definition
action.php:9
modules
main
lib
eventlog
actionsms.php
Создано системой
1.10.0