1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
recipientcontroller.php
См. документацию.
1
<?php
2
namespace
Bitrix\Sender\Integration\Crm\Timeline
;
3
4
use Bitrix\Crm\Timeline;
5
6
use
Bitrix\Main\ArgumentException
;
7
use
Bitrix\Sender\Entity
;
8
use
Bitrix\Sender\PostingRecipientTable
;
9
14
class
RecipientController
extends
Timeline\EntityController
15
{
17
protected
static
$instance
=
null
;
18
24
public
static
function
getInstance
()
25
{
26
if
(self::$instance ===
null
)
27
{
28
self::$instance =
new
static
();
29
}
30
return
self::$instance;
31
}
32
38
public
function
getEntityTypeID
()
39
{
40
return \CCrmOwnerType::Wait;
41
}
42
49
public
function
onCreate
($id,
array
$params
)
50
{
51
52
}
53
60
public
function
onModify
($id,
array
$params
)
61
{
62
63
}
64
71
public
function
onDelete
($ownerID,
array
$params
)
72
{
73
74
}
75
83
public
function
prepareHistoryDataModel
(
array
$data
,
array
$options
=
null
)
84
{
85
$settings
= (object) ((isset(
$data
[
'SETTINGS'
]) && is_array(
$data
[
'SETTINGS'
])) ?
$data
[
'SETTINGS'
] :
array
());
86
$data
= parent::prepareHistoryDataModel(
$data
,
$options
);
87
88
try
89
{
90
91
if
(
$settings
->isAds)
92
{
93
$entity
=
new
Entity\Ad
(
$settings
->letterId);
94
$settings
->path =
'/marketing/ads/edit/'
.
$settings
->letterId .
'/'
;
95
$settings
->messageName =
$entity
->getMessage()->getName();
96
}
97
else
98
{
99
$entity
=
new
Entity\Letter
(
$settings
->letterId);
100
$settings
->path =
'/marketing/letter/edit/'
.
$settings
->letterId .
'/'
;
101
$settings
->messageName =
$entity
->getMessage()->getName();
102
}
103
$settings
->letterTitle =
$entity
->get(
'TITLE'
);
104
105
if
(
$settings
->recipient)
106
{
107
$row =
PostingRecipientTable::getRow
([
108
'select'
=> [
'IS_READ'
,
'IS_CLICK'
,
'IS_UNSUB'
,
'STATUS'
],
109
'filter'
=> [
'=ID'
=>
$settings
->recipient[
'id'
]]
110
]);
111
$settings
->isRead = $row ? $row[
'IS_READ'
] ==
'Y'
:
false
;
112
$settings
->isClick = $row ? $row[
'IS_CLICK'
] ==
'Y'
:
false
;
113
$settings
->isUnsub = $row ? $row[
'IS_UNSUB'
] ==
'Y'
:
false
;
114
$settings
->isError = $row ? $row[
'STATUS'
] ===
PostingRecipientTable::SEND_RESULT_ERROR
:
false
;
115
}
116
117
118
$data
[
'SETTINGS'
] = (
array
)
$settings
;
119
}
120
catch
(
ArgumentException
$e)
121
{
122
return
$data
;
123
}
124
125
return
$data
;
126
}
127
}
Bitrix\Main\ArgumentException
Определения
ArgumentException.php:9
Bitrix\Main\ORM\Data\DataManager\getRow
static getRow(array $parameters)
Определения
datamanager.php:398
Bitrix\Sender\Entity\Ad
Определения
ad.php:19
Bitrix\Sender\Entity\Letter
Определения
letter.php:36
Bitrix\Sender\Integration\Crm\Timeline\RecipientController
Определения
recipientcontroller.php:15
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\onDelete
onDelete($ownerID, array $params)
Определения
recipientcontroller.php:71
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\getEntityTypeID
getEntityTypeID()
Определения
recipientcontroller.php:38
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\onModify
onModify($id, array $params)
Определения
recipientcontroller.php:60
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\prepareHistoryDataModel
prepareHistoryDataModel(array $data, array $options=null)
Определения
recipientcontroller.php:83
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\getInstance
static getInstance()
Определения
recipientcontroller.php:24
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\$instance
static $instance
Определения
recipientcontroller.php:17
Bitrix\Sender\Integration\Crm\Timeline\RecipientController\onCreate
onCreate($id, array $params)
Определения
recipientcontroller.php:49
Bitrix\Sender\PostingRecipientTable
Определения
posting.php:669
Bitrix\Sender\PostingRecipientTable\SEND_RESULT_ERROR
const SEND_RESULT_ERROR
Определения
posting.php:672
$options
$options
Определения
commerceml2.php:49
$data
$data['IS_AVAILABLE']
Определения
.description.php:13
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$entity
$entity
Определения
group_bizproc_workflow_delete.php:17
Bitrix\Sender\Entity
Определения
ad.php:8
Bitrix\Sender\Integration\Crm\Timeline
Определения
recipientcontroller.php:2
$settings
$settings
Определения
product_settings.php:43
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
bitrix
modules
sender
lib
integration
crm
timeline
recipientcontroller.php
Создано системой
1.14.0