11 private static function addViewedComment(
$params = [])
18 $taskId = (isset(
$params[
'taskId']) ? intval(
$params[
'taskId']) : 0);
19 $commentId = (isset(
$params[
'commentId']) ? intval(
$params[
'commentId']) : 0);
28 if (!isset(self::$viewedCommentsCache[$taskId]))
30 self::$viewedCommentsCache[$taskId] = [];
33 if (in_array($commentId, self::$viewedCommentsCache[$taskId]))
38 self::$viewedCommentsCache[$taskId][] = $commentId;
45 return array_keys(self::$viewedCommentsCache);
51 EventResult::UNDEFINED,
56 $taskId =
$event->getParameter(
'taskId');
57 $commentId =
$event->getParameter(
'commentId');
61 || intval($commentId) <= 0
67 self::addViewedComment([
69 'commentId' => $commentId