1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Configuration

Открытые статические члены

static getDefaultPresetId ()
static createDefaultPreset ()
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 restoreBindings (int $userId)
static createSharedPreset (array $accessCodes, string $presetName, int $creatorId, array $settings=[], 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 ()

Поля данных

const DEFAULT_PRESET_NAME = 'default'
const DEFAULT_PRESET_SETTING_NAME = 'default_configuration_preset'
const USER_PRESET_SORT = 1000000
const NOTIFY_GROUP = 'notify'
const GENERAL_GROUP = 'general'

Защищенные статические члены

static deleteGroup (int $groupId)
static createSharedGroup (string $name, array $accessCodes, int $creator, int $sort=self::DEFAULT_SORT)
static createPersonalGroup (int $creator)

Защищенные данные

const DEFAULT_SORT = 100
const CACHE_TTL = 31536000
const CACHE_NAME = 'user_preset'
const CACHE_DIR = '/im/option/'

Статические защищенные данные

static $defaultPresetId = null

Подробное описание

См. определение в файле Configuration.php строка 25

Методы

◆ chooseExistingPreset()

chooseExistingPreset ( int $presetId,
int $userId )
static

Sets a different preset for the user

Исключения
Exception

См. определение в файле Configuration.php строка 659

◆ cleanAllCache()

cleanAllCache ( )
static
См. также
CacheManager
Возвращает
void

См. определение в файле Configuration.php строка 1029

◆ cleanUserCache()

cleanUserCache ( int $userId)
static
См. также
CacheManager::getUserCache()
Аргументы
int$userId
Возвращает
void

См. определение в файле Configuration.php строка 1017

◆ cleanUsersCache()

cleanUsersCache ( array $usersId)
static
См. также
CacheManager
Аргументы
array$usersId
Возвращает
void

См. определение в файле Configuration.php строка 1001

◆ createDefaultPreset()

createDefaultPreset ( )
static

См. определение в файле Configuration.php строка 65

◆ createPersonalGroup()

createPersonalGroup ( int $creator)
staticprotected

Creates records about a personal group in the database

Исключения
ObjectPropertyException
SystemException
ArgumentException
Exception

См. определение в файле Configuration.php строка 834

◆ createSharedGroup()

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 строка 798

◆ createSharedPreset()

createSharedPreset ( array $accessCodes,
string $presetName,
int $creatorId,
array $settings = [],
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 строка 445

◆ createUserPreset()

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 строка 363

◆ deleteGroup()

deleteGroup ( int $groupId)
staticprotected

Deletes all rows associated with this group

Исключения
SqlQueryException

См. определение в файле Configuration.php строка 774

◆ deletePreset()

deletePreset ( int $presetId)
static

Deletes the selected preset

Исключения
SystemException

См. определение в файле Configuration.php строка 585

◆ getDefaultPresetId()

getDefaultPresetId ( )
static

См. определение в файле Configuration.php строка 42

◆ getDefaultUserPreset()

getDefaultUserPreset ( )
static

См. определение в файле Configuration.php строка 259

◆ getListAvailablePresets()

getListAvailablePresets ( int $userId)
static

Gets a list of presets available to the user

Аргументы
int$userId
Возвращает
array
Исключения
ArgumentException
ObjectPropertyException
SystemException

См. определение в файле Configuration.php строка 317

◆ getPreset()

getPreset ( int $id)
static

Gets a preset by its id

Аргументы
int$id
Возвращает
array{id: int, name: string, sort: int, settings: array}
Исключения
ArgumentException
ObjectPropertyException
SystemException

См. определение в файле Configuration.php строка 234

◆ getUserPreset()

getUserPreset ( int $userId)
static

Gets the current preset of the user

См. также
\Bitrix\Im\V2\Settings\UserConfiguration
Аргументы
int$userId
Возвращает
array{notify: array, general: array}
Исключения
ArgumentException
ObjectPropertyException
SystemException

См. определение в файле Configuration.php строка 108

◆ getUserPresetFromCache()

getUserPresetFromCache ( int $userId)
static

См. определение в файле Configuration.php строка 917

◆ getUserPresetIds()

getUserPresetIds ( int $userId)
static
Аргументы
int$userId
Возвращает
array{notify: int, general: int}|null
Исключения
ArgumentException
ObjectPropertyException
SystemException

См. определение в файле Configuration.php строка 288

◆ restoreBindings()

restoreBindings ( int $userId)
static

Restores the missing bindings between the user and his current preset settings in the b_im_option_user table

Аргументы
int$userId
Возвращает
int

См. определение в файле Configuration.php строка 401

◆ setExistingPresetToUsers()

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 строка 607

◆ updateNameSharedPreset()

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

Исключения
Exception

См. определение в файле Configuration.php строка 515

◆ updatePresetSettings()

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 строка 550

Поля

◆ $defaultPresetId

$defaultPresetId = null
staticprotected

См. определение в файле Configuration.php строка 40

◆ CACHE_DIR

const CACHE_DIR = '/im/option/'
protected

См. определение в файле Configuration.php строка 38

◆ CACHE_NAME

const CACHE_NAME = 'user_preset'
protected

См. определение в файле Configuration.php строка 37

◆ CACHE_TTL

const CACHE_TTL = 31536000
protected

См. определение в файле Configuration.php строка 36

◆ DEFAULT_PRESET_NAME

const DEFAULT_PRESET_NAME = 'default'

См. определение в файле Configuration.php строка 27

◆ DEFAULT_PRESET_SETTING_NAME

const DEFAULT_PRESET_SETTING_NAME = 'default_configuration_preset'

См. определение в файле Configuration.php строка 28

◆ DEFAULT_SORT

const DEFAULT_SORT = 100
protected

См. определение в файле Configuration.php строка 29

◆ GENERAL_GROUP

const GENERAL_GROUP = 'general'

См. определение в файле Configuration.php строка 34

◆ NOTIFY_GROUP

const NOTIFY_GROUP = 'notify'

См. определение в файле Configuration.php строка 33

◆ USER_PRESET_SORT

const USER_PRESET_SORT = 1000000

См. определение в файле Configuration.php строка 31


Объявления и описания членов класса находятся в файле: