Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ratingvotelist.php
1<?php
9
13
15{
16 public static function onViewed(Event $event)
17 {
18 $result = new EventResult(
19 EventResult::UNDEFINED,
20 array(),
21 'socialnetwork'
22 );
23
24 $entityTypeId = $event->getParameter('entityTypeId');
25 $entityId = $event->getParameter('entityId');
26 $userId = $event->getParameter('userId');
27
28 if (
29 empty($entityTypeId)
30 || intval($entityId) <= 0
31 || intval($userId) <= 0
32 )
33 {
34 return $result;
35 }
36
37 if ($liveFeedEntity = Provider::init(array(
38 'ENTITY_TYPE' => Provider::DATA_ENTITY_TYPE_RATING_LIST,
39 'ENTITY_ID' => $entityTypeId.'|'.$entityId
40 )))
41 {
42 $liveFeedEntity->setContentView(array(
43 "user_id" => $userId
44 ));
45 }
46
47 $result = new EventResult(
48 EventResult::SUCCESS,
49 array(),
50 'socialnetwork'
51 );
52
53 return $result;
54 }
55}
56?>
getParameter($key)
Definition event.php:80