1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
event.php
См. документацию.
1<?php
3
4
5use Bitrix\Bitrix24\Feature;
23
24class Event extends \IRestService
25{
26 const FEATURE_EXTENDED_MODE = 'rest_offline_extended';
27
33 public static function onRestServiceBuildDescription()
34 {
35 return array(
36 \CRestUtil::GLOBAL_SCOPE => array(
37 'events' => array(__CLASS__, 'eventsList'),
38 'event.bind' => array(__CLASS__, 'eventBind'),
39 'event.unbind' => array(__CLASS__, 'eventUnBind'),
40 'event.get' => array(__CLASS__, 'eventGet'),
41 'event.offline.get' => array(__CLASS__, 'eventOfflineGet'),
42 'event.offline.clear' => array(__CLASS__, 'eventOfflineClear'),
43 'event.offline.error' => array(__CLASS__, 'eventOfflineError'),
44 'event.offline.list' => array(__CLASS__, 'eventOfflineList'),
45
46 'event.test' => array(
47 'callback' => array(__CLASS__, 'eventTest'),
48 'options' => array()
49 ),
50 \CRestUtil::EVENTS => array(
51 'onOfflineEvent' => array(
52 'rest',
53 'onAfterOfflineEventCall',
54 array(EventOfflineTable::class, 'prepareOfflineEvent'),
55 array(
56 "sendRefreshToken" => true,
57 "disableOffline" => true,
58 "allowOptions" => [
59 'minTimeout' => 'int'
60 ],
61 ),
62 )
63 ),
64 ),
65 );
66 }
67
86 public static function eventsList($query, $n, \CRestServer $server)
87 {
88 if($server->getAuthType() !== Auth::AUTH_TYPE)
89 {
90 throw new AuthTypeException();
91 }
92
93 $serviceDescription = $server->getServiceDescription();
94
95 $scopeList = array(\CRestUtil::GLOBAL_SCOPE);
96 $result = array();
97
98 $query = array_change_key_case($query, CASE_UPPER);
99
100 if(isset($query['SCOPE']))
101 {
102 if($query['SCOPE'] != '')
103 {
104 $scopeList = array($query['SCOPE']);
105 }
106 }
107 elseif(isset($query['FULL']) && $query['FULL'])
108 {
109 $scopeList = array_keys($serviceDescription);
110 }
111 else
112 {
113 $scopeList = $server->getAuthScope();
114 $scopeList[] = \CRestUtil::GLOBAL_SCOPE;
115 }
116
117 foreach ($serviceDescription as $scope => $scopeMethods)
118 {
119 if(in_array($scope, $scopeList) && isset($scopeMethods[\CRestUtil::EVENTS]))
120 {
121 $result = array_merge($result, array_keys($scopeMethods[\CRestUtil::EVENTS]));
122 }
123 }
124
125 return $result;
126 }
127
128
154 public static function eventBind($query, $n, \CRestServer $server)
155 {
156 global $USER;
157
158 if($server->getAuthType() !== \Bitrix\Rest\OAuth\Auth::AUTH_TYPE)
159 {
160 throw new AuthTypeException();
161 }
162
163 $query = array_change_key_case($query, CASE_UPPER);
164
165 $eventName = mb_strtoupper($query['EVENT'] ?? '');
166 $eventType = mb_strtolower($query['EVENT_TYPE'] ?? '');
167 $eventUser = intval($query['AUTH_TYPE'] ?? null);
168 $eventCallback = $query['HANDLER'] ?? '';
169 $options = isset($query['OPTIONS']) && is_array($query['OPTIONS']) ? $query['OPTIONS'] : [];
170
171 if ($eventUser > 0)
172 {
173 if(!\CRestUtil::isAdmin() && $eventUser !== intval($USER->GetID()))
174 {
175 throw new AccessException('Event binding with AUTH_TYPE requires administrator access rights');
176 }
177 }
178 elseif(!\CRestUtil::isAdmin())
179 {
180 $eventUser = intval($USER->GetID());
181 }
182
183 $authData = $server->getAuthData();
184
185 $connectorId = isset($authData['auth_connector']) ? $authData['auth_connector'] : '';
186
187 if($eventName == '')
188 {
189 throw new Exceptions\ArgumentNullException("EVENT");
190 }
191
192 if($eventType <> '')
193 {
194 if(!in_array($eventType, array(EventTable::TYPE_ONLINE, EventTable::TYPE_OFFLINE)))
195 {
196 throw new Exceptions\ArgumentException('Value must be one of {'.EventTable::TYPE_ONLINE.'|'.EventTable::TYPE_OFFLINE.'}', 'EVENT_TYPE');
197 }
198 }
199 else
200 {
201 $eventType = EventTable::TYPE_ONLINE;
202 }
203
204 if($eventType === EventTable::TYPE_OFFLINE)
205 {
206 if(!\CRestUtil::isAdmin())
207 {
208 throw new AccessException('Offline events binding requires administrator access rights');
209 }
210
211 $eventCallback = '';
212 $eventUser = 0;
213 }
214 elseif($eventCallback == '' && $eventType === EventTable::TYPE_ONLINE)
215 {
216 throw new Exceptions\ArgumentNullException("HANDLER");
217 }
218
219 $clientInfo = AppTable::getByClientId($server->getClientId());
220
221 if($eventCallback == '' || HandlerHelper::checkCallback($eventCallback, $clientInfo))
222 {
223 $scopeList = $server->getAuthScope();
224 $scopeList[] = \CRestUtil::GLOBAL_SCOPE;
225
226 $serviceDescription = $server->getServiceDescription();
227
228 foreach($scopeList as $scope)
229 {
230 if(
231 isset($serviceDescription[$scope])
232 && is_array($serviceDescription[$scope][\CRestUtil::EVENTS])
233 && array_key_exists($eventName, $serviceDescription[$scope][\CRestUtil::EVENTS])
234 )
235 {
236 $eventInfo = $serviceDescription[$scope][\CRestUtil::EVENTS][$eventName];
237 if(is_array($eventInfo))
238 {
239 $eventHandlerFields = array(
240 'APP_ID' => $clientInfo['ID'],
241 'EVENT_NAME' => $eventName,
242 'EVENT_HANDLER' => $eventCallback,
243 'CONNECTOR_ID' => $connectorId,
244 'OPTIONS' => []
245 );
246
247 if($eventUser > 0)
248 {
249 $eventHandlerFields['USER_ID'] = $eventUser;
250 }
251
252 if (
253 $eventCallback === ''
254 && isset($eventInfo[3]['disableOffline'])
255 && $eventInfo[3]['disableOffline'] === true
256 )
257 {
258 throw new RestException('Offline event cannot be registered for this event.', RestException::ERROR_ARGUMENT);
259 }
260
261 if (!empty($options) && isset($eventInfo[3]['allowOptions']) && is_array($eventInfo[3]['allowOptions']))
262 {
263 foreach ($eventInfo[3]['allowOptions'] as $code => $type)
264 {
265 if (isset($options[$code]))
266 {
267 if ($type === 'int')
268 {
269 $eventHandlerFields['OPTIONS'][$code] = (int) $options[$code];
270 }
271 elseif($type === 'str' && is_string($options[$code]))
272 {
273 $eventHandlerFields['OPTIONS'][$code] = $options[$code];
274 }
275 }
276 }
277 }
278
279 $lockKey = implode('|', [$clientInfo['ID'], $eventName, $eventCallback, $connectorId, $eventUser]);
280
281 if (Application::getConnection()->lock($lockKey))
282 {
283 $result = EventTable::add($eventHandlerFields);
284 Application::getConnection()->unlock($lockKey);
285 }
286 else
287 {
288 $result = (new Result())->addError(new Error('Process of binding the handler has already started'));
289 }
290
291 if($result->isSuccess())
292 {
293 \Bitrix\Rest\Event\Sender::bind($eventInfo[0], $eventInfo[1]);
294 }
295 else
296 {
297 $errorMessage = $result->getErrorMessages();
298 throw new RestException('Unable to set event handler: '.implode('. ', $errorMessage), RestException::ERROR_CORE);
299 }
300 }
301
302 return true;
303 }
304 }
305
306 throw new RestException('Event not found', EventTable::ERROR_EVENT_NOT_FOUND);
307 }
308 else
309 {
310 return false;
311 }
312 }
313
342 public static function eventUnbind($query, $n, \CRestServer $server)
343 {
344 global $USER;
345
346 if($server->getAuthType() !== Auth::AUTH_TYPE)
347 {
348 throw new AuthTypeException();
349 }
350
351 $query = array_change_key_case($query, CASE_UPPER);
352
353 $eventName = mb_strtoupper($query['EVENT'] ?? '');
354 $eventType = mb_strtolower($query['EVENT_TYPE'] ?? '');
355 $eventCallback = $query['HANDLER'] ?? '';
356
357 if($eventName == '')
358 {
359 throw new ArgumentNullException("EVENT");
360 }
361
362 if($eventType <> '')
363 {
364 if(!in_array($eventType, array(EventTable::TYPE_ONLINE, EventTable::TYPE_OFFLINE)))
365 {
366 throw new ArgumentException('Value must be one of {'.EventTable::TYPE_ONLINE.'|'.EventTable::TYPE_OFFLINE.'}', 'EVENT_TYPE');
367 }
368 }
369 else
370 {
371 $eventType = EventTable::TYPE_ONLINE;
372 }
373
374 if($eventType === EventTable::TYPE_OFFLINE)
375 {
376 if(!\CRestUtil::isAdmin())
377 {
378 throw new AccessException('Offline events unbinding requires administrator access rights');
379 }
380
381 $eventCallback = '';
382 }
383 elseif($eventCallback == '')
384 {
385 throw new Exceptions\ArgumentNullException('HANDLER');
386 }
387
388 $clientInfo = AppTable::getByClientId($server->getClientId());
389
390 $filter = array(
391 '=APP_ID' => $clientInfo["ID"],
392 '=EVENT_NAME' => $eventName,
393 '=EVENT_HANDLER' => $eventCallback,
394 );
395
396 if($eventType === EventTable::TYPE_OFFLINE)
397 {
398 $authData = $server->getAuthData();
399 $filter['=CONNECTOR_ID'] = isset($authData['auth_connector']) ? $authData['auth_connector'] : '';
400 }
401 else
402 {
403 if(isset($query['AUTH_TYPE']))
404 {
405 if(!\CRestUtil::isAdmin() && $query['AUTH_TYPE'] !== intval($USER->GetID()))
406 {
407 throw new AccessException('Event unbinding with AUTH_TYPE requires administrator access rights');
408 }
409
410 $filter['=USER_ID'] = intval($query['AUTH_TYPE']);
411 }
412 elseif(!\CRestUtil::isAdmin())
413 {
414 $filter['=USER_ID'] = intval($USER->GetID());
415 }
416 }
417
418 $dbRes = EventTable::getList(array(
419 'filter' => $filter,
420 'select' => ['ID']
421 ));
422
423 $cnt = 0;
424 while($eventInfo = $dbRes->fetch())
425 {
426 $result = EventTable::delete($eventInfo["ID"]);
427 if($result->isSuccess())
428 {
429 // we shouldn't make Unbind here, it'll be done during the first event call
430 $cnt++;
431 }
432 }
433
434 return array('count' => $cnt);
435 }
436
437
438 public static function eventGet($query, $n, \CRestServer $server)
439 {
440 global $USER;
441
442 if($server->getAuthType() !== Auth::AUTH_TYPE)
443 {
444 throw new AuthTypeException();
445 }
446
447 $result = array();
448
449 $clientInfo = AppTable::getByClientId($server->getClientId());
450
451 $filter = array(
452 "=APP_ID" => $clientInfo["ID"],
453 );
454
455 if(!\CRestUtil::isAdmin())
456 {
457 $filter['=USER_ID'] = $USER->GetID();
458 }
459
460 $dbRes = EventTable::getList(array(
461 "filter" => $filter,
462 'order' => array(
463 "ID" => "ASC",
464 ),
465 ));
466 while($eventHandler = $dbRes->fetch())
467 {
468 if($eventHandler['EVENT_HANDLER'] <> '')
469 {
470 $result[] = array(
471 "event" => $eventHandler['EVENT_NAME'],
472 "handler" => $eventHandler['EVENT_HANDLER'],
473 "auth_type" => $eventHandler['USER_ID'],
474 "offline" => 0
475 );
476 }
477 else
478 {
479 $result[] = array(
480 "event" => $eventHandler['EVENT_NAME'],
481 "connector_id" => $eventHandler['CONNECTOR_ID'] === null ? '' : $eventHandler['CONNECTOR_ID'],
482 "offline" => 1
483 );
484 }
485 }
486
487 return $result;
488 }
489
490
491 public static function eventTest($query, $n, \CRestServer $server)
492 {
493 if($server->getAuthType() !== Auth::AUTH_TYPE)
494 {
495 throw new AuthTypeException();
496 }
497
498 $clientInfo = AppTable::getByClientId($server->getClientId());
499
500 foreach(GetModuleEvents("rest", "OnRestAppTest", true) as $event)
501 {
503 "APP_ID" => $clientInfo["ID"],
504 "QUERY" => $query
505 )));
506 }
507
508 return 1;
509 }
510
511
512 public static function eventOfflineGet($query, $n, \CRestServer $server)
513 {
514 if ($server->getAuthType() !== Auth::AUTH_TYPE)
515 {
516 throw new AuthTypeException();
517 }
518
519 if (!\CRestUtil::isAdmin())
520 {
521 throw new AccessException();
522 }
523
524 $query = array_change_key_case($query, CASE_LOWER);
525
526 $clearEvents = !isset($query['clear']) ? 1 : intval($query['clear']);
527 $processId = isset($query['process_id']) ? trim($query['process_id']) : null;
528
529 if (!$clearEvents && !static::isExtendedModeEnabled())
530 {
531 throw new LicenseException('extended offline events handling');
532 }
533
534 $filter = isset($query['filter']) ? $query['filter'] : array();
535 $order = isset($query['order']) ? $query['order'] : array('TIMESTAMP_X' => 'ASC');
536 $limit = isset($query['limit']) ? intval($query['limit']) : static::LIST_LIMIT;
537
538 $getErrors = isset($query['error']) && intval($query['error']) === 1;
539
540 $authData = $server->getAuthData();
541 $connectorId = isset($authData['auth_connector']) ? $authData['auth_connector'] : '';
542
543 $returnProcessId = !$clearEvents;
544
545 if ($limit <= 0)
546 {
547 throw new Exceptions\ArgumentException('Value must be positive integer', 'LIMIT');
548 }
549
550 $queryFilter = static::sanitizeFilter($filter);
551
552 $order = static::sanitizeOrder($order);
553
554 $clientInfo = AppTable::getByClientId($server->getClientId());
555
556 $queryFilter['=APP_ID'] = $clientInfo['ID'];
557 $queryFilter['=CONNECTOR_ID'] = $connectorId;
558 $queryFilter['=ERROR'] = $getErrors ? 1 : 0;
559
560 if ($processId === null)
561 {
562 $queryFilter['=PROCESS_ID'] = '';
563 $processId = EventOfflineTable::markEvents($queryFilter, $order, $limit);
564 }
565 else
566 {
567 $returnProcessId = true;
568 }
569
570 $queryFilter['=PROCESS_ID'] = $processId;
571
572 $dbRes = EventOfflineTable::getList(array(
573 'select' => array(
574 'ID', 'TIMESTAMP_X', 'EVENT_NAME', 'EVENT_DATA', 'EVENT_ADDITIONAL', 'MESSAGE_ID'
575 ),
576 'filter' => $queryFilter,
577 'limit' => $limit,
578 'order' => $order,
579 ));
580
581 $result = array();
582
583 while ($event = $dbRes->fetch())
584 {
586 $ts = $event['TIMESTAMP_X'];
587
588 $event['TIMESTAMP_X'] = \CRestUtil::convertDateTime($ts->toString());
589
590 if (isset($event['EVENT_ADDITIONAL'][Auth::PARAM_LOCAL_USER]))
591 {
592 $event['EVENT_ADDITIONAL'] = [
593 'user_id' => $event['EVENT_ADDITIONAL'][Auth::PARAM_LOCAL_USER],
594 ];
595 }
596
597 $result[] = $event;
598 }
599
600 if ($clearEvents && count($result) > 0)
601 {
602 EventOfflineTable::clearEvents($processId, $clientInfo['ID'], $connectorId);
603 }
604
605 return array(
606 'process_id' => $returnProcessId ? $processId : null,
607 'events' => $result
608 );
609 }
610
611 public static function eventOfflineClear($query, $n, \CRestServer $server)
612 {
613 if ($server->getAuthType() !== Auth::AUTH_TYPE)
614 {
615 throw new AuthTypeException();
616 }
617
618 if (!\CRestUtil::isAdmin())
619 {
620 throw new AccessException();
621 }
622
623 $query = array_change_key_case($query, CASE_LOWER);
624
625 $processId = isset($query['process_id']) ? trim($query['process_id']) : null;
626
627 $authData = $server->getAuthData();
628 $connectorId = isset($authData['auth_connector']) ? $authData['auth_connector'] : '';
629
630 if ($processId === null)
631 {
632 throw new Exceptions\ArgumentNullException('PROCESS_ID');
633 }
634
635 $clientInfo = AppTable::getByClientId($server->getClientId());
636
637 if (isset($query['message_id']))
638 {
639 $listIds = false;
640 if (!is_array($query['message_id']))
641 {
642 throw new Exceptions\ArgumentException('Value must be array of MESSAGE_ID values', 'message_id');
643 }
644
645 foreach($query['message_id'] as $messageId)
646 {
647 $messageId = trim($messageId);
648
649 if (mb_strlen($messageId) !== 32)
650 {
651 throw new Exceptions\ArgumentException('Value must be array of MESSAGE_ID values', 'messsage_id');
652 }
653
654 $listIds[] = $messageId;
655 }
656
657 EventOfflineTable::clearEventsByMessageId($processId, $clientInfo['ID'], $connectorId, $listIds);
658 }
659 else
660 {
661 $listIds = false;
662 if (isset($query['id']))
663 {
664 if (!is_array($query['id']))
665 {
666 throw new Exceptions\ArgumentException('Value must be array of integers', 'id');
667 }
668
669 foreach($query['id'] as $id)
670 {
671 $id = intval($id);
672
673 if ($id <= 0)
674 {
675 throw new Exceptions\ArgumentException('Value must be array of integers', 'id');
676 }
677
678 $listIds[] = $id;
679 }
680 }
681
682 EventOfflineTable::clearEvents($processId, $clientInfo['ID'], $connectorId, $listIds);
683 }
684
685 return true;
686 }
687
688 public static function eventOfflineError($query, $n, \CRestServer $server)
689 {
690 if($server->getAuthType() !== Auth::AUTH_TYPE)
691 {
692 throw new AuthTypeException();
693 }
694
695 if(!\CRestUtil::isAdmin())
696 {
697 throw new AccessException();
698 }
699
700 $query = array_change_key_case($query, CASE_LOWER);
701
702 $processId = isset($query['process_id']) ? trim($query['process_id']) : null;
703 $messageId = isset($query['message_id']) ? $query['message_id'] : null;
704
705 $authData = $server->getAuthData();
706 $connectorId = isset($authData['auth_connector']) ? $authData['auth_connector'] : '';
707
708 if($processId === null)
709 {
710 throw new ArgumentNullException('PROCESS_ID');
711 }
712
713 if(!is_array($messageId))
714 {
715 throw new ArgumentException('Value must be array of MESSAGE_ID values', 'message_id');
716 }
717
718 $clientInfo = AppTable::getByClientId($server->getClientId());
719 if(count($messageId) > 0)
720 {
721 EventOfflineTable::markError($processId, $clientInfo['ID'], $connectorId, $messageId);
722 }
723
724 return true;
725 }
726
727 public static function eventOfflineList($query, $n, \CRestServer $server)
728 {
729 if($server->getAuthType() !== Auth::AUTH_TYPE)
730 {
731 throw new AuthTypeException();
732 }
733
734 if(!\CRestUtil::isAdmin())
735 {
736 throw new AccessException();
737 }
738
739 $query = array_change_key_case($query, CASE_LOWER);
740
741 $filter = isset($query['filter']) ? $query['filter'] : array();
742 $order = isset($query['order']) ? $query['order'] : array('ID' => 'ASC');
743
744 $authData = $server->getAuthData();
745 $connectorId = isset($authData['auth_connector']) ? $authData['auth_connector'] : '';
746
747 $queryFilter = static::sanitizeFilter($filter, array('ID', 'TIMESTAMP_X', 'EVENT_NAME', 'MESSAGE_ID', 'PROCESS_ID', 'ERROR'));
748
749 $order = static::sanitizeOrder($order, array('ID', 'TIMESTAMP_X', 'EVENT_NAME', 'MESSAGE_ID', 'PROCESS_ID', 'ERROR'));
750
751 $clientInfo = AppTable::getByClientId($server->getClientId());
752
753 $queryFilter['=APP_ID'] = $clientInfo['ID'];
754
755 $getEventQuery = EventOfflineTable::query();
756
757 if ($connectorId === '')
758 {
759 $getEventQuery->where('CONNECTOR_ID', '');
760 }
761 else
762 {
763 $queryFilter['=CONNECTOR_ID'] = $connectorId;
764 }
765
766 $navParams = static::getNavData($n, true);
767
768 $getEventQuery
769 ->setSelect(['ID', 'TIMESTAMP_X', 'EVENT_NAME', 'EVENT_DATA', 'EVENT_ADDITIONAL', 'MESSAGE_ID', 'PROCESS_ID', 'ERROR'])
770 ->setFilter($queryFilter)
771 ->setOrder($order)
772 ->setLimit($navParams['limit'])
773 ->setOffset($navParams['offset']);
774
775 $result = array();
776 $dbRes = $getEventQuery->exec();
777
778 while($event = $dbRes->fetch())
779 {
781 $ts = $event['TIMESTAMP_X'];
782
783 $event['TIMESTAMP_X'] = \CRestUtil::convertDateTime($ts->toString());
784
785 if (isset($event['EVENT_ADDITIONAL'][Auth::PARAM_LOCAL_USER]))
786 {
787 $event['EVENT_ADDITIONAL'] = [
788 'user_id' => $event['EVENT_ADDITIONAL'][Auth::PARAM_LOCAL_USER],
789 ];
790 }
791
792 $result[] = $event;
793 }
794
795 return static::setNavData($result, array(
796 "count" => $getEventQuery->queryCountTotal(),
797 "offset" => $navParams['offset']
798 ));
799 }
800
801 protected static function sanitizeFilter($filter, array $availableFields = null, $valueCallback = null, array $availableOperations = null)
802 {
803 static $defaultFields = array('ID', 'TIMESTAMP_X', 'EVENT_NAME', 'MESSAGE_ID');
804
805 if($availableFields === null)
806 {
807 $availableFields = $defaultFields;
808 }
809
810 return parent::sanitizeFilter(
811 $filter,
812 $availableFields,
813 function($field, $value)
814 {
815 switch($field)
816 {
817 case 'TIMESTAMP_X':
818
819 return DateTime::createFromUserTime(\CRestUtil::unConvertDateTime($value));
820
821 break;
822 }
823 return $value;
824 }
825 );
826 }
827
828 protected static function sanitizeOrder($order, array $availableFields = null)
829 {
830 static $defaultFields = array('ID', 'TIMESTAMP_X', 'EVENT_NAME', 'MESSAGE_ID');
831
832 if($availableFields === null)
833 {
834 $availableFields = $defaultFields;
835 }
836
837 return parent::sanitizeOrder($order, $availableFields);
838 }
839
840 protected static function isExtendedModeEnabled()
841 {
842 return !Loader::includeModule('bitrix24')
843 || Feature::isFeatureEnabled(static::FEATURE_EXTENDED_MODE);
844 }
845}
$type
Определения options.php:106
if(! $messageFields||!isset($messageFields['message_id'])||!isset($messageFields['status'])||!CModule::IncludeModule("messageservice")) $messageId
Определения callback_ismscenter.php:26
Определения error.php:15
Определения loader.php:13
Определения auth.php:22
Определения event.php:25
static sanitizeOrder($order, array $availableFields=null)
Определения event.php:828
static onRestServiceBuildDescription()
Определения event.php:33
const FEATURE_EXTENDED_MODE
Определения event.php:26
static eventsList($query, $n, \CRestServer $server)
Определения event.php:86
static sanitizeFilter($filter, array $availableFields=null, $valueCallback=null, array $availableOperations=null)
Определения event.php:801
static eventBind($query, $n, \CRestServer $server)
Определения event.php:154
static eventUnbind($query, $n, \CRestServer $server)
Определения event.php:342
static eventTest($query, $n, \CRestServer $server)
Определения event.php:491
static eventGet($query, $n, \CRestServer $server)
Определения event.php:438
static isExtendedModeEnabled()
Определения event.php:840
static eventOfflineClear($query, $n, \CRestServer $server)
Определения event.php:611
static eventOfflineError($query, $n, \CRestServer $server)
Определения event.php:688
Определения app.php:68
static getByClientId($clientId)
Определения app.php:967
static bind($moduleId, $eventName)
Определения sender.php:73
static clearEvents($processId, $appId, $connectorId, $listIds=false)
Определения eventoffline.php:221
static clearEventsByMessageId($processId, $appId, $connectorId, $listIds=false)
Определения eventoffline.php:241
static markError($processId, $appId, $connectorId, array $listIds)
Определения eventoffline.php:266
static markEvents($filter, $order, $limit)
Определения eventoffline.php:165
Определения event.php:38
const TYPE_OFFLINE
Определения event.php:44
const TYPE_ONLINE
Определения event.php:43
const ERROR_EVENT_NOT_FOUND
Определения event.php:41
static checkCallback($handlerUrl, $appInfo=array(), $checkInstallUrl=true)
Определения handlerhelper.php:31
const ERROR_CORE
Определения restexception.php:15
const ERROR_ARGUMENT
Определения restexception.php:16
Определения rest.php:24
getServiceDescription()
Определения rest.php:397
getAuthData()
Определения rest.php:324
getAuthScope()
Определения rest.php:329
getAuthType()
Определения rest.php:347
getClientId()
Определения rest.php:362
Определения rest.php:896
const LIST_LIMIT
Определения rest.php:897
$options
Определения commerceml2.php:49
</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
$query
Определения get_search.php:11
$filter
Определения iblock_catalog_list.php:54
while($arParentIBlockProperty=$dbParentIBlockProperty->Fetch()) $errorMessage
global $USER
Определения csv_new_run.php:40
$navParams
Определения csv_new_run.php:35
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
ExecuteModuleEventEx($arEvent, $arParams=[])
Определения tools.php:5214
GetModuleEvents($MODULE_ID, $MESSAGE_ID, $bReturnArray=false)
Определения tools.php:5177
Определения handlers.php:8
Определения event.php:2
Определения auth.php:9
$order
Определения payment.php:8
$event
Определения prolog_after.php:141
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
$n
Определения update_log.php:107
$dbRes
Определения yandex_detail.php:168