Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
ratingvotelist.php
1
<?php
8
namespace
Bitrix\Socialnetwork\Integration\Main
;
9
10
use
Bitrix\Socialnetwork\Livefeed\Provider
;
11
use
Bitrix\Main\Event
;
12
use
Bitrix\Main\EventResult
;
13
14
class
RatingVoteList
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
?>
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\Event\getParameter
getParameter($key)
Definition
event.php:80
Bitrix\Main\EventResult
Definition
eventresult.php:5
Bitrix\Socialnetwork\Integration\Main\RatingVoteList
Definition
ratingvotelist.php:15
Bitrix\Socialnetwork\Integration\Main\RatingVoteList\onViewed
static onViewed(Event $event)
Definition
ratingvotelist.php:16
Bitrix\Socialnetwork\Livefeed\Provider
Definition
provider.php:22
Bitrix\Socialnetwork\Integration\Main
Definition
file.php:3
modules
socialnetwork
lib
integration
main
ratingvotelist.php
Создано системой
1.10.0