Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
logright.php
1<?php
9
11
13{
14 public static function get(int $logId = 0)
15 {
16 $result = [];
17
18 if ($logId <= 0)
19 {
20 return $result;
21 }
22
23 $res = LogRightTable::getList([
24 'filter' => [
25 '=LOG_ID' => $logId
26 ],
27 'select' => [ 'GROUP_CODE' ]
28 ]);
29 while ($logRightFields = $res->fetch())
30 {
31 $result[] = $logRightFields['GROUP_CODE'];
32 }
33
34 return $result;
35 }
36
37 public static function OnAfterLogUpdate(\Bitrix\Main\Entity\Event $event)
38 {
39 $primary = $event->getParameter('primary');
40 $logId = (!empty($primary['ID']) ? intval($primary['ID']) : 0);
41 $fields = $event->getParameter('fields');
42
43 if (
44 $logId > 0
45 && !empty($fields)
46 && !empty($fields['LOG_UPDATE'])
47 )
48 {
50 'logId' => $logId,
51 'value' => $fields['LOG_UPDATE']
52 ));
53 }
54 }
55}
static OnAfterLogUpdate(\Bitrix\Main\Entity\Event $event)
Definition logright.php:37
static setLogUpdate($params=array())
Definition logright.php:64