Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
General.php
1
<?php
2
3
namespace
Bitrix\Im\V2\Controller\Settings
;
4
5
use
Bitrix\Im\V2\Controller\Filter\SettingsCheckAccess
;
6
use
Bitrix\Im\V2\Settings\UserConfiguration
;
7
8
class
General
extends
\Bitrix\Im\V2\Controller\BaseController
9
{
10
protected
function
getDefaultPreFilters
()
11
{
12
return
array_merge(
13
parent::getDefaultPreFilters(),
14
[
15
new
SettingsCheckAccess
(),
16
]
17
);
18
}
19
23
public
function
listAction
(
int
$userId): array
24
{
25
$userConfiguration =
new
UserConfiguration
($userId);
26
27
return
$userConfiguration->getGeneralSettings();
28
}
29
33
public
function
updateAction
(
int
$userId,
string
$name,
string
$value): bool
34
{
35
$value = $value ===
'N'
? false : ($value ===
'Y'
? true : $value);
36
$userConfiguration =
new
UserConfiguration
($userId);
37
$userConfiguration->updateGeneralSetting([
38
'name'
=> $name,
39
'value'
=> $value
40
]);
41
42
return
true
;
43
}
44
}
Bitrix\Im\V2\Controller\BaseController
Definition
BaseController.php:24
Bitrix\Im\V2\Controller\Filter\SettingsCheckAccess
Definition
SettingsCheckAccess.php:12
Bitrix\Im\V2\Controller\Settings\General
Definition
General.php:9
Bitrix\Im\V2\Controller\Settings\General\getDefaultPreFilters
getDefaultPreFilters()
Definition
General.php:10
Bitrix\Im\V2\Controller\Settings\General\listAction
listAction(int $userId)
Definition
General.php:23
Bitrix\Im\V2\Controller\Settings\General\updateAction
updateAction(int $userId, string $name, string $value)
Definition
General.php:33
Bitrix\Im\V2\Settings\UserConfiguration
Definition
UserConfiguration.php:17
Bitrix\Im\V2\Controller\Settings
Definition
General.php:3
modules
im
lib
V2
Controller
Settings
General.php
Создано системой
1.10.0