Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
space.php
1<?php
2
4
11
12class Space extends Base
13{
27 public function getTotalCountersAction(): array
28 {
29 return Counter::getInstance($this->userId)
30 ->getMemberSpaceCounters();
31 }
32
38 public function readAllAction(int $space = 0, string $feature = Dictionary::FEATURE_DISCUSSIONS): void
39 {
40 if (!array_key_exists($feature, Dictionary::AVAILABLE_FEATURES))
41 {
42 return;
43 }
44
45 switch ($feature)
46 {
47 case Dictionary::FEATURE_GENERAL:
48 case Dictionary::FEATURE_DISCUSSIONS:
49 Service::addEvent(
50 EventDictionary::EVENT_SPACE_LIVEFEED_READ_ALL, [
51 'USER_ID' => $this->userId,
52 'GROUP_ID' => $space,
53 'FEATURE_ID' => $feature,
54 ]
55 );
56 break;
57 }
58 }
59
65 public function saveListSateAction(string $spacesListState): void
66 {
67 SpaceListMode::setOption($this->getCurrentUser()->getId(), $spacesListState);
68
69 if (Loader::includeModule('intranet'))
70 {
71 \Bitrix\Intranet\Composite\CacheProvider::deleteUserCache();
72 }
73 }
74}
readAllAction(int $space=0, string $feature=Dictionary::FEATURE_DISCUSSIONS)
Definition space.php:38
saveListSateAction(string $spacesListState)
Definition space.php:65
static setOption(int $userId, string $mode)