Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
contentviewhandler.php
1<?php
10
13
21{
22 const CONTENT_TYPE_ID_COMMENT = 'LOG_COMMENT';
23
24 final static function getContentTypeIdList()
25 {
26 return array(
27 self::CONTENT_TYPE_ID_COMMENT
28 );
29 }
30
37 public static function onContentViewed($viewParams)
38 {
39 $userId = intval($viewParams['userId']);
40 $contentTypeId = $viewParams['typeId'];
41 $contentEntityId = intval($viewParams['entityId']);
42
43 if (
44 $userId <= 0
45 || !in_array($contentTypeId, self::getContentTypeIdList())
46 || $contentEntityId <= 0
47 || !Loader::includeModule('im')
48 )
49 {
50 return false;
51 }
52
53 $subTagList = array();
54 if ($contentTypeId == self::CONTENT_TYPE_ID_COMMENT)
55 {
56
57 }
58
59 if (!empty($subTagList))
60 {
61 $CIMNotify = new \CIMNotify();
62 $CIMNotify->markNotifyReadBySubTag($subTagList);
63 }
64
65 return true;
66 }
67}