1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
handler.php
См. документацию.
1
<?php
8
namespace
Bitrix\Mail\Integration\Main\UISelector
;
9
10
use
Bitrix\Main\Event
;
11
use
Bitrix\Main\EventResult
;
12
13
class
Handler
14
{
15
const
ENTITY_TYPE_MAILCONTACTS
=
'MAILCONTACTS'
;
16
17
public
static
function
OnUISelectorGetProviderByEntityType
(
Event
$event
)
18
{
19
$result
=
new
EventResult
(EventResult::UNDEFINED,
null
,
'mail'
);
20
21
$entityType =
$event
->getParameter(
'entityType'
);
22
23
switch
($entityType)
24
{
25
case
self::ENTITY_TYPE_MAILCONTACTS:
26
$provider
= new \Bitrix\Mail\Integration\Main\UISelector\MailContacts;
27
break
;
28
default
:
29
$provider
=
false
;
30
}
31
32
if
(
$provider
)
33
{
34
$result
=
new
EventResult
(
35
EventResult::SUCCESS,
36
array
(
37
'result'
=>
$provider
38
),
39
'mail'
40
);
41
}
42
43
return
$result
;
44
}
45
46
public
static
function
OnUISelectorFillLastDestination
(
Event
$event
)
47
{
48
$result
=
new
EventResult
(EventResult::UNDEFINED,
null
,
'mail'
);
49
50
$params
=
$event
->getParameter(
'params'
);
51
$destSortData =
$event
->getParameter(
'destSortData'
);
52
53
$lastDestinationList = [];
54
55
$mailContactCounter = 0;
56
57
if
(is_array($destSortData))
58
{
59
$mailContactLimit = 10;
60
61
foreach
($destSortData as
$code
=> $sortInfo)
62
{
63
if
($mailContactCounter >= $mailContactLimit)
64
{
65
break
;
66
}
67
68
if
(preg_match(
'/^'
.
MailContacts::PREFIX
.
'(\d+)$/i'
,
$code
,
$matches
))
69
{
70
if
($mailContactCounter >= $mailContactLimit)
71
{
72
continue
;
73
}
74
if
(!isset($lastDestinationList[self::ENTITY_TYPE_MAILCONTACTS]))
75
{
76
$lastDestinationList[self::ENTITY_TYPE_MAILCONTACTS] = [];
77
}
78
$lastDestinationList[self::ENTITY_TYPE_MAILCONTACTS][
$code
] =
$code
;
79
$mailContactCounter++;
80
}
81
}
82
83
$result
=
new
EventResult
(
84
EventResult::SUCCESS,
85
[
86
'lastDestinationList'
=> $lastDestinationList
87
],
88
'mail'
89
);
90
}
91
92
return
$result
;
93
}
94
}
$provider
if(!Loader::includeModule('messageservice')) $provider
Определения
callback_ednaruimhpx.php:21
Bitrix\Mail\Integration\Main\UISelector\Handler
Определения
handler.php:14
Bitrix\Mail\Integration\Main\UISelector\Handler\OnUISelectorGetProviderByEntityType
static OnUISelectorGetProviderByEntityType(Event $event)
Определения
handler.php:17
Bitrix\Mail\Integration\Main\UISelector\Handler\ENTITY_TYPE_MAILCONTACTS
const ENTITY_TYPE_MAILCONTACTS
Определения
handler.php:15
Bitrix\Mail\Integration\Main\UISelector\Handler\OnUISelectorFillLastDestination
static OnUISelectorFillLastDestination(Event $event)
Определения
handler.php:46
Bitrix\Mail\Integration\Main\UISelector\MailContacts\PREFIX
const PREFIX
Определения
mailcontacts.php:9
Bitrix\Main\Event
Определения
event.php:5
Bitrix\Main\EventResult
Определения
eventresult.php:5
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$result
$result
Определения
get_property_values.php:14
$code
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения
options.php:195
Bitrix\Mail\Integration\Main\UISelector
Определения
handler.php:8
$event
$event
Определения
prolog_after.php:141
$params
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения
template.php:799
$matches
$matches
Определения
index.php:22
bitrix
modules
mail
lib
integration
main
uiselector
handler.php
Создано системой
1.14.0