Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
FilterModeOption.php
1
<?php
2
namespace
Bitrix\Socialnetwork\Space\List
;
3
4
final
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,
14
Dictionary::FILTER_MODES
[
'my'
],
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
}
Bitrix\Socialnetwork\Space\List\Dictionary\FILTER_MODES
const FILTER_MODES
Definition
Dictionary.php:7
Bitrix\Socialnetwork\Space\List\FilterModeOption
Definition
FilterModeOption.php:5
Bitrix\Socialnetwork\Space\List\FilterModeOption\getOption
static getOption(int $userId)
Definition
FilterModeOption.php:9
Bitrix\Socialnetwork\Space\List\FilterModeOption\setOption
static setOption(int $userId, string $mode)
Definition
FilterModeOption.php:19
Bitrix\Socialnetwork\Space\List
Definition
Dictionary.php:3
modules
socialnetwork
lib
Space
List
FilterModeOption.php
Создано системой
1.10.0