1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
handler.php
См. документацию.
1<?php
9
12
14{
15 const ENTITY_TYPE_MAILCONTACTS = 'MAILCONTACTS';
16
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
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}
if(!Loader::includeModule('messageservice')) $provider
Определения callback_ednaruimhpx.php:21
static OnUISelectorGetProviderByEntityType(Event $event)
Определения handler.php:17
static OnUISelectorFillLastDestination(Event $event)
Определения handler.php:46
Определения event.php:5
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
$event
Определения prolog_after.php:141
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$matches
Определения index.php:22