1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
space.php
См. документацию.
1<?php
2
3namespace Bitrix\Socialnetwork\Controller;
4
5use Bitrix\Main\Loader;
6use Bitrix\Socialnetwork\Internals\EventService\EventDictionary;
7use Bitrix\Socialnetwork\Internals\EventService\Service;
8use Bitrix\Socialnetwork\Internals\Space\Counter;
9use Bitrix\Socialnetwork\Space\List\Dictionary;
10use Bitrix\Socialnetwork\Space\List\SpaceListMode;
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)
Определения space.php:38
saveListSateAction(string $spacesListState)
Определения space.php:65
static setOption(int $userId, string $mode)
Определения SpaceListMode.php:26
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804