Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
logright.php
1
<?php
8
namespace
Bitrix\Socialnetwork\Item
;
9
10
use
Bitrix\Socialnetwork\LogRightTable
;
11
12
class
LogRight
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
{
49
LogRightTable::setLogUpdate
(array(
50
'logId'
=> $logId,
51
'value'
=> $fields[
'LOG_UPDATE'
]
52
));
53
}
54
}
55
}
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Socialnetwork\Item\LogRight
Definition
logright.php:13
Bitrix\Socialnetwork\Item\LogRight\OnAfterLogUpdate
static OnAfterLogUpdate(\Bitrix\Main\Entity\Event $event)
Definition
logright.php:37
Bitrix\Socialnetwork\LogRightTable
Definition
logright.php:31
Bitrix\Socialnetwork\LogRightTable\setLogUpdate
static setLogUpdate($params=array())
Definition
logright.php:64
Bitrix\Socialnetwork\Item
Definition
contentviewhandler.php:9
Bitrix
modules
socialnetwork
lib
item
logright.php
Создано системой
1.10.0