1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
logentry.php
См. документацию.
1<?php
9
10use Bitrix\Socialnetwork\Livefeed\Provider;
13
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?>
Определения event.php:5
Определения logentry.php:15
static onGetContentId(Event $event)
Определения logentry.php:53
static onSetContentView(Event $event)
Определения logentry.php:16
</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
$event
Определения prolog_after.php:141
$contentId
Определения sonet_set_content_view.php:27