Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
rc.php
1<?php
9
10
12
15
16
17Loc::loadMessages(__FILE__);
18
19class 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}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
static getFilterFields()
Definition rc.php:26
saveData($id, array $data)
Definition rc.php:61