|
static | getDefaultPresetId () |
|
static | getUserPreset (int $userId) |
|
static | getPreset (int $id) |
|
static | getDefaultUserPreset () |
|
static | getUserPresetIds (int $userId) |
|
static | getListAvailablePresets (int $userId) |
|
static | createUserPreset (int $userId, array $settings) |
|
static | createSharedPreset (array $accessCodes, array $settings, string $presetName, int $creatorId, int $sort=self::DEFAULT_SORT, bool $force=false) |
|
static | updateNameSharedPreset (int $presetId, int $modifyId, string $newName) |
|
static | updatePresetSettings (int $presetId, int $modifyId, array $settings) |
|
static | deletePreset (int $presetId) |
|
static | setExistingPresetToUsers (int $presetId, array $userList, bool $force=false) |
|
static | chooseExistingPreset (int $presetId, int $userId) |
|
static | getUserPresetFromCache (int $userId) |
|
static | cleanUsersCache (array $usersId) |
|
static | cleanUserCache (int $userId) |
|
static | cleanAllCache () |
|
См. определение в файле Configuration.php строка 22
◆ chooseExistingPreset()
static chooseExistingPreset |
( |
int |
$presetId, |
|
|
int |
$userId |
|
) |
| |
|
static |
Sets a different preset for the user
- Исключения
-
См. определение в файле Configuration.php строка 524
◆ cleanAllCache()
◆ cleanUserCache()
static cleanUserCache |
( |
int |
$userId | ) |
|
|
static |
◆ cleanUsersCache()
static cleanUsersCache |
( |
array |
$usersId | ) |
|
|
static |
◆ createPersonalGroup()
static createPersonalGroup |
( |
int |
$creator | ) |
|
|
staticprotected |
Creates records about a personal group in the database
- Исключения
-
ObjectPropertyException | |
SystemException | |
ArgumentException | |
Exception | |
См. определение в файле Configuration.php строка 699
◆ createSharedGroup()
static createSharedGroup |
( |
string |
$name, |
|
|
array |
$accessCodes, |
|
|
int |
$creator, |
|
|
int |
$sort = self::DEFAULT_SORT |
|
) |
| |
|
staticprotected |
Creates records about a shared group in the database
- Исключения
-
SystemException | |
ArgumentException | |
Exception | |
См. определение в файле Configuration.php строка 663
◆ createSharedPreset()
static createSharedPreset |
( |
array |
$accessCodes, |
|
|
array |
$settings, |
|
|
string |
$presetName, |
|
|
int |
$creatorId, |
|
|
int |
$sort = self::DEFAULT_SORT , |
|
|
bool |
$force = false |
|
) |
| |
|
static |
Creates a general preset for a department or a list of users by access codes with the selected priority, enters the settings into the database and sets the resulting group to users if the priority of their current group is not greater than this one. If force is true, the priority of the current presets is not taken into account
- Аргументы
-
array | $accessCodes | |
array | $settings | |
string | $presetName | |
int | $creatorId | |
int | $sort | |
bool | $force | |
- Возвращает
- int|null
- Исключения
-
ArgumentException | |
ObjectPropertyException | |
SystemException | |
См. определение в файле Configuration.php строка 315
◆ createUserPreset()
static createUserPreset |
( |
int |
$userId, |
|
|
array |
$settings |
|
) |
| |
|
static |
Creates a personal preset of the user with the maximum priority, sets the settings in the database and exposes the resulting preset to the user
- Исключения
-
ObjectPropertyException | |
SystemException | |
ArgumentException | |
Exception | |
См. определение в файле Configuration.php строка 284
◆ deleteGroup()
static deleteGroup |
( |
int |
$groupId | ) |
|
|
staticprotected |
Deletes all rows associated with this group
- Исключения
-
См. определение в файле Configuration.php строка 639
◆ deletePreset()
static deletePreset |
( |
int |
$presetId | ) |
|
|
static |
◆ getDefaultPresetId()
static getDefaultPresetId |
( |
| ) |
|
|
static |
◆ getDefaultUserPreset()
static getDefaultUserPreset |
( |
| ) |
|
|
static |
◆ getListAvailablePresets()
static getListAvailablePresets |
( |
int |
$userId | ) |
|
|
static |
Gets a list of presets available to the user
- Аргументы
-
- Возвращает
- array
- Исключения
-
ArgumentException | |
ObjectPropertyException | |
SystemException | |
См. определение в файле Configuration.php строка 238
◆ getPreset()
static getPreset |
( |
int |
$id | ) |
|
|
static |
Gets a preset by its id
- Аргументы
-
- Возвращает
- array{id: int, name: string, sort: int, settings: array}
- Исключения
-
ArgumentException | |
ObjectPropertyException | |
SystemException | |
См. определение в файле Configuration.php строка 160
◆ getUserPreset()
static getUserPreset |
( |
int |
$userId | ) |
|
|
static |
Gets the current preset of the user
- Аргументы
-
- Возвращает
- array{notify: array, general: array}
- Исключения
-
ArgumentException | |
ObjectPropertyException | |
SystemException | |
См. определение в файле Configuration.php строка 64
◆ getUserPresetFromCache()
static getUserPresetFromCache |
( |
int |
$userId | ) |
|
|
static |
◆ getUserPresetIds()
static getUserPresetIds |
( |
int |
$userId | ) |
|
|
static |
- Аргументы
-
- Возвращает
- array{notify: int, general: int}|null
- Исключения
-
ArgumentException | |
ObjectPropertyException | |
SystemException | |
См. определение в файле Configuration.php строка 209
◆ setExistingPresetToUsers()
static setExistingPresetToUsers |
( |
int |
$presetId, |
|
|
array |
$userList, |
|
|
bool |
$force = false |
|
) |
| |
|
static |
Sets an existing preset to the users taking into account or not the priority of their current preset
- Исключения
-
ObjectPropertyException | |
ArgumentException | |
SystemException | |
См. определение в файле Configuration.php строка 472
◆ updateNameSharedPreset()
static updateNameSharedPreset |
( |
int |
$presetId, |
|
|
int |
$modifyId, |
|
|
string |
$newName |
|
) |
| |
|
static |
Updates the name of the shared preset by its ID, also updates the date of change and who changed the preset
- Исключения
-
См. определение в файле Configuration.php строка 380
◆ updatePresetSettings()
static updatePresetSettings |
( |
int |
$presetId, |
|
|
int |
$modifyId, |
|
|
array |
$settings |
|
) |
| |
|
static |
Updates the preset settings by its ID, also updates the date of change and who changed the preset
- Исключения
-
SystemException | |
ArgumentException | |
Exception | |
См. определение в файле Configuration.php строка 415
◆ $defaultPresetId
◆ CACHE_DIR
const CACHE_DIR = '/im/option/' |
|
protected |
◆ CACHE_NAME
const CACHE_NAME = 'user_preset' |
|
protected |
◆ CACHE_TTL
const CACHE_TTL = 31536000 |
|
protected |
◆ DEFAULT_PRESET_NAME
const DEFAULT_PRESET_NAME = 'default' |
◆ DEFAULT_PRESET_SETTING_NAME
const DEFAULT_PRESET_SETTING_NAME = 'default_configuration_preset' |
◆ DEFAULT_SORT
◆ GENERAL_GROUP
const GENERAL_GROUP = 'general' |
◆ NOTIFY_GROUP
const NOTIFY_GROUP = 'notify' |
◆ USER_PRESET_SORT
const USER_PRESET_SORT = 1000000 |