Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
FilterModeOption.php
1<?php
3
4final class FilterModeOption
5{
6 private const MODULE_NAME = 'socialnetwork';
7 private const OPTION_NAME = 'spaces_list_filter_mode';
8
9 public static function getOption(int $userId): string
10 {
11 return \CUserOptions::GetOption(
12 self::MODULE_NAME,
13 self::OPTION_NAME,
15 $userId,
16 );
17 }
18
19 public static function setOption(int $userId, string $mode): void
20 {
21 if (in_array($mode, Dictionary::FILTER_MODES))
22 {
23 \CUserOptions::SetOption(
24 self::MODULE_NAME,
25 self::OPTION_NAME,
26 $mode,
27 false,
28 $userId,
29 );
30 }
31 }
32}
static setOption(int $userId, string $mode)