Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
rc.php
1
<?php
8
namespace
Bitrix\Sender\Entity
;
9
10
11
use
Bitrix\Main\Localization\Loc
;
12
13
use
Bitrix\Sender\Integration
;
14
use
Bitrix\Sender\Message\Factory
;
15
16
17
Loc::loadMessages
(__FILE__);
18
19
class
Rc
extends
Letter
20
{
26
protected
static
function
getFilterFields
()
27
{
28
$messageCodes = [];
29
$messages = Factory::getReturnCustomerMessages();
30
foreach
($messages as
$message
)
31
{
32
$messageCodes[] =
$message
->getCode();
33
}
34
35
return
array(
36
array(
37
'CODE'
=>
null
,
38
'VALUE'
=>
'N'
,
39
'FILTER'
=>
'=CAMPAIGN.IS_TRIGGER'
40
),
41
array(
42
'CODE'
=>
'IS_ADS'
,
43
'VALUE'
=>
'N'
,
44
'FILTER'
=>
'=IS_ADS'
45
),
46
array(
47
'CODE'
=>
'MESSAGE_CODE'
,
48
'VALUE'
=> $messageCodes,
49
'FILTER'
=>
'=MESSAGE_CODE'
50
),
51
);
52
}
53
61
protected
function
saveData
($id, array $data)
62
{
63
if
(!Integration\Crm\ReturnCustomer\Service::isAvailable())
64
{
65
$this->addError(
Loc::getMessage
(
'SENDER_ENTITY_RC_ERROR_NO_ACCESS'
),
'feature:sender_rc'
);
66
return
$id;
67
}
68
69
return
parent::saveData($id, $data);
70
}
71
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sender\Entity\Letter
Definition
letter.php:34
Bitrix\Sender\Entity\Letter\$message
$message
Definition
letter.php:39
Bitrix\Sender\Entity\Rc
Definition
rc.php:20
Bitrix\Sender\Entity\Rc\getFilterFields
static getFilterFields()
Definition
rc.php:26
Bitrix\Sender\Entity\Rc\saveData
saveData($id, array $data)
Definition
rc.php:61
Bitrix\Sender\Message\Factory
Definition
factory.php:21
Bitrix\Sender\Entity
Definition
ad.php:8
Bitrix\Sender\Integration
modules
sender
lib
entity
rc.php
Создано системой
1.10.0