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

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

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 ()
 

Открытые атрибуты

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

Методы

◆ chooseExistingPreset()

static chooseExistingPreset ( int  $presetId,
int  $userId 
)
static

Sets a different preset for the user

Исключения
Exception

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

◆ cleanAllCache()

static cleanAllCache ( )
static

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

◆ cleanUserCache()

static cleanUserCache ( int  $userId)
static

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

◆ cleanUsersCache()

static cleanUsersCache ( array  $usersId)
static

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

◆ 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

Исключения
SqlQueryException

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

◆ deletePreset()

static deletePreset ( int  $presetId)
static

Deletes the selected preset

Исключения
SystemException

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

◆ getDefaultPresetId()

static getDefaultPresetId ( )
static

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

◆ getDefaultUserPreset()

static getDefaultUserPreset ( )
static

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

◆ getListAvailablePresets()

static getListAvailablePresets ( int  $userId)
static

Gets a list of presets available to the user

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

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

◆ getPreset()

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

◆ getUserPreset()

static getUserPreset ( int  $userId)
static

Gets the current preset of the user

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

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

◆ getUserPresetFromCache()

static getUserPresetFromCache ( int  $userId)
static

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

◆ getUserPresetIds()

static getUserPresetIds ( int  $userId)
static
Аргументы
int$userId
Возвращает
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

Исключения
Exception

См. определение в файле 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

$defaultPresetId = null
staticprotected

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

◆ CACHE_DIR

const CACHE_DIR = '/im/option/'
protected

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

◆ CACHE_NAME

const CACHE_NAME = 'user_preset'
protected

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

◆ CACHE_TTL

const CACHE_TTL = 31536000
protected

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

◆ DEFAULT_PRESET_NAME

const DEFAULT_PRESET_NAME = 'default'

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

◆ DEFAULT_PRESET_SETTING_NAME

const DEFAULT_PRESET_SETTING_NAME = 'default_configuration_preset'

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

◆ DEFAULT_SORT

const DEFAULT_SORT = 100
protected

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

◆ GENERAL_GROUP

const GENERAL_GROUP = 'general'

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

◆ NOTIFY_GROUP

const NOTIFY_GROUP = 'notify'

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

◆ USER_PRESET_SORT

const USER_PRESET_SORT = 1000000

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