1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
logentry.php
См. документацию.
1
<?php
8
namespace
Bitrix\Socialnetwork\Integration\Mobile
;
9
10
use Bitrix\Socialnetwork\Livefeed\Provider;
11
use
Bitrix\Main\Event
;
12
use
Bitrix\Main\EventResult
;
13
14
class
LogEntry
15
{
16
public
static
function
onSetContentView
(
Event
$event
)
17
{
18
$result
=
new
EventResult
(
19
EventResult::UNDEFINED,
20
array
(),
21
'socialnetwork'
22
);
23
24
$logEventFields =
$event
->getParameter(
'logEventFields'
);
25
26
if
(!is_array($logEventFields))
27
{
28
return
$result
;
29
}
30
31
if
(
$contentId
= Provider::getContentId($logEventFields))
32
{
33
if
($liveFeedEntity = Provider::init(
array
(
34
'ENTITY_TYPE'
=>
$contentId
[
'ENTITY_TYPE'
],
35
'ENTITY_ID'
=>
$contentId
[
'ENTITY_ID'
],
36
'LOG_ID'
=> $logEventFields[
"ID"
]
37
)))
38
{
39
if
($liveFeedEntity->setContentView())
40
{
41
$result
=
new
EventResult
(
42
EventResult::SUCCESS,
43
array
(),
44
'socialnetwork'
45
);
46
}
47
}
48
}
49
50
return
$result
;
51
}
52
53
public
static
function
onGetContentId
(
Event
$event
)
54
{
55
$result
=
new
EventResult
(
56
EventResult::UNDEFINED,
57
array
(),
58
'socialnetwork'
59
);
60
61
$logEventFields =
$event
->getParameter(
'logEventFields'
);
62
63
if
(!is_array($logEventFields))
64
{
65
return
$result
;
66
}
67
68
if
(
$contentId
= Provider::getContentId($logEventFields))
69
{
70
$result
=
new
EventResult
(
71
EventResult::SUCCESS,
72
array
(
73
'contentId'
=>
$contentId
74
),
75
'socialnetwork'
76
);
77
}
78
79
return
$result
;
80
}
81
}
82
?>
Bitrix\Main\Event
Определения
event.php:5
Bitrix\Main\EventResult
Определения
eventresult.php:5
Bitrix\Socialnetwork\Integration\Mobile\LogEntry
Определения
logentry.php:15
Bitrix\Socialnetwork\Integration\Mobile\LogEntry\onGetContentId
static onGetContentId(Event $event)
Определения
logentry.php:53
Bitrix\Socialnetwork\Integration\Mobile\LogEntry\onSetContentView
static onSetContentView(Event $event)
Определения
logentry.php:16
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
Bitrix\Socialnetwork\Integration\Mobile
Определения
logentry.php:8
$event
$event
Определения
prolog_after.php:141
$contentId
$contentId
Определения
sonet_set_content_view.php:27
bitrix
modules
socialnetwork
lib
integration
mobile
logentry.php
Создано системой
1.14.0