General extends Base
Table of Contents
Constants
- ENTITY = 'se'
- PRIVACY_RESULT_ALL = 'all'
- PRIVACY_RESULT_CONTACT = 'contact'
- PRIVACY_RESULT_NOBODY = 'nobody'
Methods
- allowedUserBySimpleNotificationSettings() : bool
- checkingValues() : array<string|int, mixed>
- createWithUserId() : General
- decodeSettings() : array<string|int, mixed>
- Converts a flat array of templates into an array of general settings
- encodeSettings() : array<string|int, mixed>
- Converts general settings into a flat array, in which the key is a template, and the value is the value of the setting
- filterAllowedUsersBySimpleNotificationSettings() : array<string|int, mixed>
- getDefaultSettings() : array<string|int, mixed>
- Get default entity settings
- getGroupSettings() : array<string|int, mixed>
- Gets the group's notification settings
- getUserSettings() : array<string|int, mixed>
- Gets the user's notification settings
- getValue() : mixed
- setSettings() : void
- Encodes the received settings and enters them into the database and cache
- updateGroupSettings() : void
- Updates the group's notification settings
Constants
ENTITY
public
mixed
ENTITY
= 'se'
PRIVACY_RESULT_ALL
public
mixed
PRIVACY_RESULT_ALL
= 'all'
PRIVACY_RESULT_CONTACT
public
mixed
PRIVACY_RESULT_CONTACT
= 'contact'
PRIVACY_RESULT_NOBODY
public
mixed
PRIVACY_RESULT_NOBODY
= 'nobody'
Methods
allowedUserBySimpleNotificationSettings()
public
static allowedUserBySimpleNotificationSettings(int $userId, string $notifyType) : bool
Parameters
- $userId : int
- $notifyType : string
Return values
boolcheckingValues()
public
static checkingValues(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
- $settings : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>createWithUserId()
public
static createWithUserId(int $userId) : General
Parameters
- $userId : int
Return values
GeneraldecodeSettings()
Converts a flat array of templates into an array of general settings
public
static decodeSettings(array<string|int, mixed> $rowSettings) : array<string|int, mixed>
Parameters
- $rowSettings : array<string|int, mixed>
Return values
array<string|int, mixed>encodeSettings()
Converts general settings into a flat array, in which the key is a template, and the value is the value of the setting
public
static encodeSettings(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
- $settings : array<string|int, mixed>
Return values
array<string|int, mixed>filterAllowedUsersBySimpleNotificationSettings()
public
static filterAllowedUsersBySimpleNotificationSettings(array<string|int, mixed> $userList, string $notifyType) : array<string|int, mixed>
Parameters
- $userList : array<string|int, mixed>
- $notifyType : string
Return values
array<string|int, mixed>getDefaultSettings()
Get default entity settings
public
static getDefaultSettings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getGroupSettings()
Gets the group's notification settings
public
static getGroupSettings(int $groupId) : array<string|int, mixed>
Parameters
- $groupId : int
Tags
Return values
array<string|int, mixed>getUserSettings()
Gets the user's notification settings
public
static getUserSettings(int $userId) : array<string|int, mixed>
Parameters
- $userId : int
Tags
Return values
array<string|int, mixed>getValue()
public
getValue(mixed $settingName) : mixed
Parameters
- $settingName : mixed
setSettings()
Encodes the received settings and enters them into the database and cache
public
static setSettings(int $groupId[, array<string|int, mixed> $settings = [] ][, bool $forInitialize = false ]) : void
Parameters
- $groupId : int
- $settings : array<string|int, mixed> = []
- $forInitialize : bool = false
Tags
updateGroupSettings()
Updates the group's notification settings
public
static updateGroupSettings(int $groupId, array<string|int, mixed> $settings) : void
Parameters
- $groupId : int
- $settings : array<string|int, mixed>